%define packname RScaLAPACK Name: R-%{packname} Version: 0.6.1 Release: 8%{?dist} Source0: ftp://cran.r-project.org/pub/R/contrib/main/%{packname}_%{version}.tar.gz License: MIT URL: http://cran.r-project.org/web/packages/RScaLAPACK/index.html Group: Applications/Engineering Summary: An interface to perform parallel computation on linear algebra problems using ScaLAPACK BuildRequires: openmpi-devel, R-devel, tetex-latex, lapack-devel, blas-devel, atlas-devel BuildRequires: gcc-gfortran, blacs-openmpi-devel, scalapack-openmpi-devel, autoconf, automake Requires: R-core, scalapack-openmpi, openmpi Patch0: R-RScaLAPACK-0.5.1-mpi-blacs.patch Patch3: R-RScaLAPACK-0.6.1-configurefix.patch Patch6: R-RScaLAPACK-0.6.1-mpicc.patch Patch7: R-RScaLAPACK-0.6.1-atlas.patch Patch8: R-RScaLAPACK-0.6.1-lapack.patch Patch9: R-RScaLAPACK-0.6.1-mpiblacs.patch Patch10: R-RScaLAPACK-0.6.1-AC_MSG_ERROR.patch Patch11: R-RScaLAPACK-0.6.1-blas.patch Patch12: R-RScaLAPACK-0.6.1-fflags.patch %description R package: An R add-on package capable of carrying out parallel computation through a single function call from the R environment. It uses the high-performance ScaLAPACK library for the linear algebra computations. %prep %setup -q -c -n %{packname} %patch0 -p1 -b .mpi %patch3 -p1 -b .configurefix %patch6 -p1 -b .mpicc %patch7 -p1 -b .atlas %patch8 -p1 -b .lapack %patch9 -p1 -b .mpiblacs %patch10 -p1 -b .AC_MSG_ERROR %patch11 -p1 -b .blas %patch12 -p1 -b .fflags cd RScaLAPACK R_CC=`R CMD config CC` R_F77=`R CMD config F77` R_SHLIB_LD=`R CMD config SHLIB_LD` MPICC=`echo $R_CC| sed 's|gcc|mpicc|'` MPIF77=`echo $R_F77 | sed 's|gfortran|mpif77|'` MPISHLIB_LD=`echo $R_SHLIB_LD | sed 's|gcc|mpicc|'` sed -i "s|@MPICC@|$MPICC|g" configure.in sed -i "s|@MPIF77@|$MPIF77|g" configure.in sed -i "s|@MPICC@|$MPICC|g" src/Makefile.in sed -i "s|@MPISHLIB_LD@|$MPISHLIB_LD|" src/Makefile.in aclocal autoconf %build %install mkdir -p $RPM_BUILD_ROOT%{_libdir}/R/library # Build OpenMPI version export MPI_COMPILER=openmpi %{_openmpi_load} OPENMPICFLAGS="$CFLAGS" OPENMPILDFLAGS="-L$MPI_LIB" OPENMPI_INCLUDE="-I$MPI_INCLUDE" export RPM_OPT_FLAGS="%{optflags}" export CFLAGS="$RPM_OPT_FLAGS $LDFLAGS $OPENMPILDFLAGS -lutil -lmpiblacsCinit -lmpiblacs -lmpi -llapack" export CC=mpicc export F77=mpif77 export FFLAGS="$RPM_OPT_FLAGS $LDFLAGS $OPENMPILDFLAGS -lutil -llapack -lmpi" export MPI_INCLUDE="$OPENMPI_INCLUDE" %{_bindir}/R CMD INSTALL --library=$RPM_BUILD_ROOT%{_libdir}/R/library \ --configure-args="--with-blacs=%{_libdir}/openmpi/lib/ --with-lapack=%{_libdir} --with-blas=%{_libdir} --with-atlas=%{_libdir}/atlas/ --with-scalapack=%{_libdir}/openmpi/lib CC=mpicc FFLAGS='$RPM_OPT_FLAGS $LDFLAGS $OPENMPILDFLAGS -lutil -llapack -lmpi'" %{packname} %{_openmpi_unload} # Clean up in advance of check test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so) rm -rf $RPM_BUILD_ROOT%{_libdir}/R/library/R.css %check # Check is pretty darned broken. # %%{_bindir}/R CMD check %{packname} %files %{_libdir}/R/library/%{packname}/ %changelog * Wed Nov 9 2011 Tom Callaway <spot@fedoraproject.org> - 0.6.1-8 - rebuild for R 2.14.0 * Thu Aug 4 2011 Tom Callaway <spot@fedoraproject.org> - 0.6.1-7 - fix package against cleaned up scalapack * Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Oct 20 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 0.6.1-5 - bump for new MPI * Thu Jul 8 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 0.6.1-4 - fix blacs path passed to configure * Thu Jul 8 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 0.6.1-3 - drop scriptlets * Mon Feb 22 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 0.6.1-2 - adjust package to use proper blacs paths * Thu Jan 14 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 0.6.1-1 - glue this package back together, update to 0.6.1 * Wed Aug 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.5.1-22 - fix url, drop old bitsize macros * Thu Aug 6 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.5.1-21 - Update for new MPI scheme * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Sep 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.5.1-18 - ... and forgot to remove one last bit of the lam ick * Wed Sep 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.5.1-17 - forgot to add one patch * Wed Sep 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.5.1-16 - use openmpi instead of lam * Tue Jul 8 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.5.1-15 - look for mpi_comm_create_ not mpi_comm_create__ * Tue Jul 8 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.5.1-14 - source /etc/profiles/modules.sh, then use module load * Tue Jul 8 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.5.1-13 - ok, lets try this. * Tue Jul 8 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.5.1-12 - fix compile against new lam * Wed Mar 12 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.5.1-11.2 - debugging build pass * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.5.1-11.1 - Autorebuild for GCC 4.3 * Sun Aug 26 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.5.1-10 - modernize spec file - fix license tag - rebuild for BuildID * Fri Mar 30 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.5.1-9 - include bitsize specific lam include directory * Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> 0.5.1-8 - rebuilt for unwind info generation, broken in gcc-4.1.1-21 * Fri Sep 15 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.5.1-6 - BR: lam-devel * Fri Sep 15 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.5.1-4 - fc6 bump * Thu Mar 9 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.5.1-3 - forgot to upload source * Sun Feb 26 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.5.1-2 - get this thing working again * Mon Jan 9 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.5.1-1 - bump to 0.5.1 * Mon May 16 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.4.0-9 - test fails unless you are running it on a lam cluster, so don't run it here * Sun May 15 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.4.0-8 - fc3 branch doesn't need gcc4 patch * Sun May 15 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.4.0-7 - 64 bit lib fix * Mon May 9 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.4.0-6 - remove hardcoded dist tags * Sun May 8 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.4.0-5 - blacs and scalapack need to be BuildRequires too. * Sun May 8 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.4.0-4 - add lam as BuildRequires * Sun Apr 24 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.4.0-3 - add dist tag * Tue Apr 19 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.4.0-2 - add gcc-gfortran as a BuildRequires (gcc-g77 for fc3) * Mon Apr 18 2005 Tom "spot" Callaway <tcallawa@redhat.com> - Initial package creation