Summary: MPI implementation over Infiniband RDMA-enabled interconnect Name: mvapich Version: 1.0.1 Release: alt1.M41.1 %define mpi_device ch_gen2 %define mpi_prefix %_libexecdir/%name %define mpi_sysconfdir %_sysconfdir/%name %define compiler gcc License: BSD Group: Development/Other Source: %name-%version.tar Patch: mvapich-0.9.9-1458-alt-buildreq.patch Packager: Stanislav Ievlev <inger@altlinux.org> URL: http://nowlab.cse.ohio-state.edu/projects/mpi-iba/index.html Requires(post,preun): mpi-selector BuildPreReq: mpi-selector # Automatically added by buildreq on Wed Jan 30 2008 BuildRequires: gcc-c++ gcc-fortran libibumad-devel libibverbs-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''. %package devel Summary: development part of the %name Group: Development/Other Requires: %name = %version-%release Requires: libibumad-devel libibverbs-devel %description devel development part of the %name %prep %setup -q %patch -p1 %build ARCH_NAME= IB_INCLUDE= IB_LIB= OPTIMIZATION_FLAG="%optflags" BIT= CONFIG_ENABLE_F77="--enable-f77" CONFIG_ENABLE_F90="--enable-f90" EXTRA_CFLAG= MPE_FLAGS= buildidfile=BUILDID # GNU compilers %if %(test "%{compiler}" = "gcc" && echo 1 || echo 0) export CC=gcc export CXX=g++ if ( which gfortran &>/dev/null ); then # new gcc version export FC=gfortran export F77=gfortran export F90=gfortran export F77_GETARGDECL=" " elif ( which g77 &>/dev/null ); then # old gcc version export FC=g77 export F77=g77 export F90=g77 fi export CFLAGS="-Wall -DDISABLE_PTMALLOC" export FFLAGS= export CXXFLAGS="" export F90FLAGS="" export CONFIG_FLAGS="" %endif # Intel compiler %if %(test "%{compiler}" = "intel" && echo 1 || echo 0) export CC=icc export CXX=icc export FC=ifort export F90=$FC export CFLAGS="-D__INTEL_COMPILER" export FFLAGS="" export CXXFLAGS= export CCFLAGS="-lstdc++" export F90FLAGS=$FFLAGS export CONFIG_FLAGS="" export COMPILER_CONFIG="--enable-f90modules --with-romio" %endif # Pathscale compiler %if %(test "%{compiler}" = "pathscale" && echo 1 || echo 0) export CC=pathcc export CXX=pathCC export FC=pathf90 export F90=pathf90 export F77=pathf90 export CFLAGS="" export FFLAGS="" export CXXFLAGS="" export CCFLAGS="" export F90FLAGS=$FFLAGS export CONFIG_FLAGS="" export COMPILER_CONFIG="--enable-f90modules --with-romio" %endif # PGI compiler %if %(test "%{compiler}" = "pgi" && echo 1 || echo 0) export CC=pgcc export CXX=pgCC export FC=pgf77 export F90=pgf90 export CFLAGS="-Msignextend -B -DPGI" export FFLAGS="" export CXXFLAGS="" export F90FLAGS=$FFLAGS export CONFIG_FLAGS="" export OPTIMIZATION_FLAG="" %endif ############################################################################# EXTRA_CFLAG=$CFLAGS %ifarch %ix86 ARCH_NAME="-D_IA32_" %endif %ifarch x86_64 ARCH_NAME="-D_EM64T_" %endif # check for version if [ -f $buildidfile ]; then buildid=`cat $buildidfile | grep MVAPICH_BUILDID |awk '{print $2}'` if [ "$buildid" != "" ];then DEF_BUILDID="$DEF_BUILDID -DMVAPICH_BUILDID=\\\"$buildid\\\"" else DEF_BUILDID="" fi fi IB_INCLUDE=%_includedir IB_LIB=%_libdir export CFLAGS="$OPTIMIZATION_FLAG -DCOMPAT_MODE -DCH_GEN2 -DMEMORY_SCALE -D_AFFINITY_ $CFLAGS -D_SMP_ -D_SMP_RNDV_ -DVIADEV_RPUT_SUPPORT -DEARLY_SEND_COMPLETION -DLAZY_MEM_UNREGISTER $ARCH_NAME -I$IB_INCLUDE" #TCP #export CFLAGS= #TCP export USER_CFLAGS export MPE_OPTS export MPE_CFLAGS export LDFLAGS export CXXFLAGS="$CXXFLAGS" export FFLAGS="$FFLAGS -L$IB_LIB $EXTRA_CFLAG" export F90FLAGS="$F90FLAGS $EXTRA_CFLAG" export CONFIG_FLAGS export MPIRUN_CFLAGS="$MPIRUN_CFLAGS -DPARAM_GLOBAL=\\\"%mpi_sysconfdir/mvapich.conf\\\" -DLD_LIBRARY_PATH_MPI=\\\"%mpi_prefix/lib\\\" $DEF_BUILDID" ./configure \ --without-mpe \ --with-device=%mpi_device \ --with-arch=LINUX \ --prefix=%buildroot/%mpi_prefix \ $CONFIG_ENABLE_F77 \ $CONFIG_ENABLE_F90 \ $COMPILER_CONFIG \ -lib="-L$IB_LIB -libverbs -libumad -libcommon -lpthread $EXTRA_CFLAG" \ -rsh=ssh \ $MPE_FLAGS \ $CONFIG_FLAGS #TCP #./configure \ # --without-mpe \ # --with-arch=LINUX \ # --prefix=%buildroot/%mpi_prefix \ # $CONFIG_ENABLE_F77 \ # $CONFIG_ENABLE_F90 \ # $COMPILER_CONFIG \ # -rsh=ssh \ # $MPE_FLAGS \ # $CONFIG_FLAGS #TCP #NO SMP %make %install %makeinstall install -d %buildroot/%_sysconfdir mv %buildroot/%mpi_prefix/etc %buildroot/%mpi_sysconfdir cp -a osu_benchmarks %buildroot/%mpi_prefix find %buildroot -type f -print0 | xargs -r0 file | fgrep text | cut -d: -f1 | xargs -r \ sed -i \ -e "s^prefix=%buildroot/%mpi_prefix^prefix=%mpi_prefix^g" \ -e "s^sysconfdir=.*^sysconfdir=%mpi_sysconfdir^g" \ -e "s^includedir=.*^includedir=%mpi_prefix/include^g" \ -e "s^libdir=.*^libdir=%mpi_prefix/lib^g" \ -e "s^bindir=.*^bindir=%mpi_prefix/bin^g" \ -e "s^-L%buildroot^-L^g" \ -e "s^-I%buildroot^-I^g" # Additionally, create the mpivars.[c]sh files. cat >%buildroot%mpi_prefix/bin/mpivars.csh <<EOF if (\$?path) then if ( "\${path}" !~ *%mpi_prefix/bin* ) then set path = ( %mpi_prefix/bin \$path ) endif else set path = ( %mpi_prefix/bin ) endif if (\$?MANPATH) then if ( "\$MANPATH" !~ *%mpi_prefix/man* ) then setenv MANPATH %mpi_prefix/man:\$MANPATH endif else setenv MANPATH %mpi_prefix/man: endif EOF cat >%buildroot%mpi_prefix/bin/mpivars.sh <<EOF if ! echo \$PATH | grep -q %mpi_prefix/bin ; then PATH=%mpi_prefix/bin:\$PATH fi if ! echo \$MANPATH | grep -q %mpi_prefix/man ; then MANPATH=%mpi_prefix/man:\$MANPATH fi EOF rm -f %buildroot%mpi_prefix/bin/mpirun_dbg.ddd %post %post_mpi_selector %name %mpi_prefix/bin %preun %preun_mpi_selector %name %files %dir %mpi_prefix %mpi_prefix/bin %exclude %mpi_prefix/bin/mpif77 %exclude %mpi_prefix/bin/mpif90 %exclude %mpi_prefix/bin/mpicc %exclude %mpi_prefix/bin/mpiCC %exclude %mpi_prefix/bin/mpicxx %dir %mpi_prefix/man/ %mpi_prefix/man/man1 %exclude %mpi_prefix/man/man1/mpicc* %exclude %mpi_prefix/man/man1/mpiCC* %exclude %mpi_prefix/man/man1/mpif* %dir %mpi_sysconfdir %config(noreplace) %mpi_sysconfdir/*.conf %files devel %doc doc/*.pdf %mpi_prefix/bin/mpif77 %mpi_prefix/bin/mpif90 %mpi_prefix/bin/mpicc %mpi_prefix/bin/mpicxx %mpi_prefix/man/man1/mpicc* %mpi_prefix/man/man1/mpiCC* %mpi_prefix/man/man1/mpif* %mpi_prefix/include %mpi_prefix/lib/*.a %mpi_prefix/osu_benchmarks %changelog * Thu Jun 19 2008 Stanislav Ievlev <inger@altlinux.org> 1.0.1-alt1.M41.1 - build for 4.1 * Thu Jun 19 2008 Stanislav Ievlev <inger@altlinux.org> 1.0.1-alt1 - 1.0.1 * Sat May 24 2008 Stanislav Ievlev <inger@altlinux.org> 1.0-alt1 - 1.0 - fix build in Sisyphus * Thu Jan 31 2008 Stanislav Ievlev <inger@altlinux.org> 0.9.9-alt2 - little spec improvements - install osu_benchmarks * Wed Jan 30 2008 Stanislav Ievlev <inger@altlinux.org> 0.9.9-alt1 - Initial build