buildout.cfg 2.12 KB
[buildout]
parts =
  libatlas


[skip-throttle-check.patch]
recipe = hexagonit.recipe.download
md5sum = 17c8471d67c99fac80ace05273ce0817
url = ${:_profile_base_location_}/${:filename}
filename = ${:_buildout_section_name_}
download-only = true


[atlas-download]
recipe = hexagonit.recipe.download
version = 3.10.1
filename = atlas${:version}.tar.bz2
url = http://downloads.sourceforge.net/project/math-atlas/Stable/${:version}/${:filename}
md5sum = 78753e869231cc1417a92eebaa076718
download-only = true
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}


[lapack-download]
recipe = hexagonit.recipe.download
version = 3.5.0
filename = lapack-${:version}.tgz
url = http://www.netlib.org/lapack/${:filename}
md5sum = b1d3e3e425b2e44a06760ff173104bdf
download-only = true
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}



[libatlas]
recipe = cp.recipe.cmd
location = ${buildout:parts-directory}/${:_buildout_section_name_}
lapack_version = 3.5.0
install_cmd =
  set -e
  mkdir -p ${:location}__compile__
  cd ${:location}__compile__
  export SRCdir=`pwd`/ATLAS
  export BLDdir=`pwd`/build
  tar xfj ${atlas-download:location}/${atlas-download:filename}
  cd $SRCdir
  # http://stackoverflow.com/questions/14592401/atlas-install-really-need-to-get-past-cpu-throttle-check
  # http://sourceforge.net/p/math-atlas/support-requests/886/
  patch -p1 <${skip-throttle-check.patch:location}/${skip-throttle-check.patch:filename}
  mkdir -p $BLDdir
  cd $BLDdir
  export F77LIB=${gcc-fortran:location}/lib64/libgfortran.so.3
  export LD_PRELOAD=$F77LIB
  $SRCdir/configure -b 64 \
        --prefix=${:location} \
        --with-netlib-lapack-tarfile=${lapack-download:location}/${lapack-download:filename} \
        -C acg ${gcc-fortran:location}/bin/gcc \
        -C if ${gcc-fortran:location}/bin/gfortran \
        --shared

  #-Ss f77lib `${gcc-fortran:location}/bin/gfortran --print-file-name=libgfortran.so` \

  make build    # tune & build lib
  make check    # sanity check correct answer
#  make ptcheck  # sanity check parallel
  make time     # check if lib is fast
  make install  # copy libs to install dir