From 349ef1d72386ebf8a47e63e6e97974f50c205ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Mach=C3=A1=C4=8Dek?= Date: Wed, 12 Nov 2014 16:51:17 +0100 Subject: Handling of 32-bit versus 64-bit integers in sci-chemistry/nwchem-6.5_p26243-r1 corrected. Package-Manager: portage-2.2.14 --- sci-chemistry/nwchem/ChangeLog | 7 + sci-chemistry/nwchem/nwchem-6.5_p26243-r1.ebuild | 268 +++++++++++++++++++++++ sci-chemistry/nwchem/nwchem-6.5_p26243.ebuild | 259 ---------------------- 3 files changed, 275 insertions(+), 259 deletions(-) create mode 100644 sci-chemistry/nwchem/nwchem-6.5_p26243-r1.ebuild delete mode 100644 sci-chemistry/nwchem/nwchem-6.5_p26243.ebuild (limited to 'sci-chemistry') diff --git a/sci-chemistry/nwchem/ChangeLog b/sci-chemistry/nwchem/ChangeLog index a9461ce25..df19a2136 100644 --- a/sci-chemistry/nwchem/ChangeLog +++ b/sci-chemistry/nwchem/ChangeLog @@ -2,6 +2,13 @@ # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*nwchem-6.5_p26243-r1 (12 Nov 2014) + + 12 Nov 2014; Honza Macháček + -nwchem-6.5_p26243.ebuild, +nwchem-6.5_p26243-r1.ebuild: + Handling of 32-bit versus 64-bit integers in + sci-chemistry/nwchem-6.5_p26243-r1 corrected. + *nwchem-6.5_p26243 (11 Nov 2014) 11 Nov 2014; Honza Macháček diff --git a/sci-chemistry/nwchem/nwchem-6.5_p26243-r1.ebuild b/sci-chemistry/nwchem/nwchem-6.5_p26243-r1.ebuild new file mode 100644 index 000000000..3926d499b --- /dev/null +++ b/sci-chemistry/nwchem/nwchem-6.5_p26243-r1.ebuild @@ -0,0 +1,268 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +PYTHON_COMPAT=( python{2_6,2_7} ) + +inherit eutils flag-o-matic fortran-2 multilib python-single-r1 toolchain-funcs + +DATE="2014-09-10" + +DESCRIPTION="Delivering High-Performance Computational Chemistry to Science" +HOMEPAGE="http://www.nwchem-sw.org/index.php/Main_Page" +SRC_URI="http://www.nwchem-sw.org/images/Nwchem-${PV%_p*}.revision${PV#*_p}-src.${DATE}.tar.gz + http://www.nwchem-sw.org/images/Util_md_sockets.patch.gz + http://www.nwchem-sw.org/images/Hbar.patch.gz + http://www.nwchem-sw.org/images/Tcenxtask.patch.gz + http://www.nwchem-sw.org/images/Hnd_giaxyz_noinline.patch.gz + http://www.nwchem-sw.org/images/Parallelmpi.patch.gz + http://www.nwchem-sw.org/images/Makefile_gcc4x.patch.gz + http://www.nwchem-sw.org/images/Bcast_ccsd.patch.gz + http://www.nwchem-sw.org/images/Elpa_syncs.patch.gz + http://www.nwchem-sw.org/images/Xlmpoles_ifort15.patch.gz" + +LICENSE="ECL-2.0" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="blas cuda infiniband lapack mpi doc examples int64 nwchem-tests openmp mrcc python scalapack" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) + infiniband? ( mpi ) + scalapack? ( !int64 ) + lapack? ( blas ) + scalapack? ( blas )" + +RDEPEND=" + sys-fs/sysfsutils + blas? ( virtual/blas ) + lapack? ( virtual/lapack ) + scalapack? ( virtual/scalapack ) + cuda? ( dev-util/nvidia-cuda-sdk ) + int64? ( + blas? ( virtual/blas[int64] ) + lapack? ( virtual/lapack[int64] ) + ) + python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND} + app-shells/tcsh + mpi? ( virtual/mpi[fortran] ) + infiniband? ( || ( + sys-cluster/openmpi[fortran,openmpi_fabrics_ofed] + sys-cluster/mvapich2[fortran] + ) ) + doc? ( + dev-texlive/texlive-latex + dev-tex/latex2html )" + +LONG_S="${WORKDIR}/Nwchem-${PV%_p*}.revision${PV#*_p}-src.${DATE}" +S="${WORKDIR}/${PN}" + +pkg_setup() { + # fortran-2.eclass does not handle mpi wrappers + if use mpi; then + export FC="mpif90" + export F77="mpif77" + export CC="mpicc" + export CXX="mpic++" + else + tc-export FC F77 CC CXX + fi + + use openmp && FORTRAN_NEED_OPENMP=1 + + fortran-2_pkg_setup + + if use openmp; then + # based on _fortran-has-openmp() of fortran-2.eclass + local openmp="" + local fcode=ebuild-openmp-flags.f + local _fc=$(tc-getFC) + + pushd "${T}" + cat <<- EOF > "${fcode}" + 1 call omp_get_num_threads + 2 end + EOF + + for openmp in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do + "${_fc}" "${openmp}" "${fcode}" -o "${fcode}.x" && break + done + + rm -f "${fcode}.*" + popd + + append-flags "${openmp}" + fi + + use python && python-single-r1_pkg_setup +} + +src_unpack() { + unpack ${A} + mv "${LONG_S}" "${S}" +} + +src_prepare() { + pushd "${S}"/src + for p in Util_md_sockets Hbar Tcenxtask Parallelmpi Makefile_gcc4x Bcast_ccsd Elpa_syncs Xlmpoles_ifort15 + do epatch "${WORKDIR}"/"${p}.patch" + done + cd NWints/hondo + epatch "${WORKDIR}"/Hnd_giaxyz_noinline.patch + popd + epatch "${FILESDIR}"/nwchem-6.1.1-nwchemrc.patch + use python && epatch "${FILESDIR}"/nwchem-6.5-python_makefile.patch + use doc && epatch "${FILESDIR}"/nwchem-6.3-r1-html_doc.patch + + sed \ + -e "s:DBASIS_LIBRARY=\"'\$(SRCDIR)'\":DBASIS_LIBRARY=\"'${EPREFIX}/usr/share/NWChem'\":g" \ + -i src/basis/MakeFile src/basis/GNUmakefile || die + sed \ + -e "s:DNWPW_LIBRARY=\"'\$(SRCDIR)'\":DNWPW_LIBRARY=\"'${EPREFIX}/usr/share/NWChem'\":g" \ + -i src/nwpw/libraryps/GNUmakefile || die + sed \ + -e "s:-DCOMPILATION_DIR=\"'\$(TOPDIR)'\":-DCOMPILATION_DIR=\"''\":g" \ + -i src/GNUmakefile src/MakeFile || die + + if [[ $(tc-getFC) == *-*-*-*-gfortran ]]; then + sed \ + -e "s:ifneq (\$(FC),gfortran):ifneq (\$(FC),$(tc-getFC)):g" \ + -e "s:ifeq (\$(FC),gfortran):ifeq (\$(FC),$(tc-getFC)):g" \ + -i src/config/makefile.h || die + fi +} + +src_compile() { + export NWCHEM_LONG_PATHS=Y + export USE_SUBGROUPS=yes + if use mpi ; then + export MSG_COMMS=MPI + export USE_MPI=y + export USE_MPIF=y + export USE_MPIF4=y + export MPI_LOC="${EPREFIX}"/usr + export MPI_INCLUDE=$MPI_LOC/include + export MPI_LIB=$MPI_LOC/$(get_libdir) + export LIBMPI="$(mpif90 -showme:link)" + if use infiniband; then + export ARMCI_NETWORK=OPENIB + else + export ARMCI_NETWORK=MPI-TS + fi + else + unset USE_MPI + unset USE_MPIF + unset USE_MPIF4 + export MSG_COMMS=TCGMSG + export ARMCI_NETWORK=SOCKETS + fi + if [ "$ARCH" = "amd64" ]; then + export NWCHEM_TARGET=LINUX64 + elif [ "$ARCH" = "ia64" ]; then + export NWCHEM_TARGET=LINUX64 + elif [ "$ARCH" = "x86" ]; then + export NWCHEM_TARGET=LINUX + elif [ "$ARCH" = "ppc" ]; then + export NWCHEM_TARGET=LINUX + else + die "Unknown architecture" + fi + if use python ; then + if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "ia64" ]; then + export USE_PYTHON64=yes + fi + export PYTHONHOME=/usr + export PYTHONVERSION=$(eselect python show --python2 |awk -Fpython '{ print $2 }') + export PYTHONPATH="./:${S}/contrib/python/" + export NWCHEM_MODULES="all python" + else + export NWCHEM_MODULES="all" + fi + use mrcc && export MRCC_THEORY="TRUE" + export CCSDTQ="TRUE" + export CCSDTLR="TRUE" + unset BLASOPT + use blas && export BLASOPT="$(pkg-config --libs blas)" + use lapack && export BLASOPT+="$(pkg-config --libs lapack)" + use scalapack && export BLASOPT+="$(pkg-config --libs scalapack)" + if use cuda; then + export TCE_CUDA=Y + export CUDA_PATH=/opt/cuda + export CUDA=${CUDA_PATH}/bin/nvcc + export CUDA_FLAGS="-arch=compute_20 -code=sm_20,compute_20" + export CUDA_INCLUDE="-I${CUDA_PATH}/include" + export CUDA_LIBS="-L${CUDA_PATH}/$(get_libdir) -lcublas -lcufft -lcudart -lcuda" + fi + export LARGE_FILES="TRUE" + + cd src + if use int64; then + export BLAS_SIZE=8 + export LAPACK_SIZE=8 + export SCALAPACK_SIZE=8 + else + export BLAS_SIZE=4 + export LAPACK_SIZE=4 + export SCALAPACK_SIZE=4 + export USE_64TO32=y + emake \ + DIAG=PAR \ + FC=$(tc-getFC) \ + CC=$(tc-getCC) \ + CXX=$(tc-getCXX) \ + NWCHEM_TOP="${S}" \ + 64_to_32 + fi + emake \ + DIAG=PAR \ + FC=$(tc-getFC) \ + CC=$(tc-getCC) \ + CXX=$(tc-getCXX) \ + NWCHEM_TOP="${S}" \ + NWCHEM_EXECUTABLE="${S}/bin/${NWCHEM_TARGET}/nwchem" + + if use doc; then + cd "${S}"/doc + export VARTEXFONTS="${T}/fonts" + emake \ + DIAG=PAR \ + NWCHEM_TOP="${S}" \ + pdf html + fi +} + +src_install() { + dobin bin/${NWCHEM_TARGET}/nwchem + + insinto /usr/share/NWChem/basis/ + doins -r src/basis/libraries src/data + insinto /usr/share/NWChem/nwpw + doins -r src/nwpw/libraryps + + insinto /etc + doins nwchemrc + + use examples && \ + insinto /usr/share/NWChem/ && \ + doins -r examples + + use nwchem-tests && \ + insinto /usr/share/NWChem && \ + doins -r QA/tests + + use doc && \ + insinto /usr/share/doc/"${P}" && \ + doins -r doc/nwahtml && \ + doins -r web + +} + +pkg_postinst() { + echo + elog "The user will need to link \$HOME/.nwchemrc to /etc/nwchemrc" + elog "or copy it in order to tell NWChem the right position of the" + elog "basis library and other necessary data." + echo +} diff --git a/sci-chemistry/nwchem/nwchem-6.5_p26243.ebuild b/sci-chemistry/nwchem/nwchem-6.5_p26243.ebuild deleted file mode 100644 index 80132339b..000000000 --- a/sci-chemistry/nwchem/nwchem-6.5_p26243.ebuild +++ /dev/null @@ -1,259 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -PYTHON_COMPAT=( python{2_6,2_7} ) - -inherit eutils flag-o-matic fortran-2 multilib python-single-r1 toolchain-funcs - -DATE="2014-09-10" - -DESCRIPTION="Delivering High-Performance Computational Chemistry to Science" -HOMEPAGE="http://www.nwchem-sw.org/index.php/Main_Page" -SRC_URI="http://www.nwchem-sw.org/images/Nwchem-${PV%_p*}.revision${PV#*_p}-src.${DATE}.tar.gz - http://www.nwchem-sw.org/images/Util_md_sockets.patch.gz - http://www.nwchem-sw.org/images/Hbar.patch.gz - http://www.nwchem-sw.org/images/Tcenxtask.patch.gz - http://www.nwchem-sw.org/images/Hnd_giaxyz_noinline.patch.gz - http://www.nwchem-sw.org/images/Parallelmpi.patch.gz - http://www.nwchem-sw.org/images/Makefile_gcc4x.patch.gz - http://www.nwchem-sw.org/images/Bcast_ccsd.patch.gz - http://www.nwchem-sw.org/images/Elpa_syncs.patch.gz - http://www.nwchem-sw.org/images/Xlmpoles_ifort15.patch.gz" - -LICENSE="ECL-2.0" -SLOT="0" -KEYWORDS="~x86 ~amd64" -IUSE="blas cuda infiniband lapack mpi doc examples int64 nwchem-tests openmp mrcc python scalapack" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) - infiniband? ( mpi ) - scalapack? ( !int64 )" - -RDEPEND=" - sys-fs/sysfsutils - blas? ( virtual/blas ) - lapack? ( virtual/lapack ) - scalapack? ( virtual/scalapack ) - cuda? ( dev-util/nvidia-cuda-sdk ) - int64? ( - blas? ( virtual/blas[int64] ) - lapack? ( virtual/lapack[int64] ) - ) - python? ( ${PYTHON_DEPS} )" -DEPEND="${RDEPEND} - app-shells/tcsh - mpi? ( virtual/mpi[fortran] ) - infiniband? ( || ( - sys-cluster/openmpi[fortran,openmpi_fabrics_ofed] - sys-cluster/mvapich2[fortran] - ) ) - doc? ( - dev-texlive/texlive-latex - dev-tex/latex2html )" - -LONG_S="${WORKDIR}/Nwchem-${PV%_p*}.revision${PV#*_p}-src.${DATE}" -S="${WORKDIR}/${PN}" - -pkg_setup() { - # fortran-2.eclass does not handle mpi wrappers - if use mpi; then - export FC="mpif90" - export F77="mpif77" - export CC="mpicc" - export CXX="mpic++" - else - tc-export FC F77 CC CXX - fi - - use openmp && FORTRAN_NEED_OPENMP=1 - - fortran-2_pkg_setup - - if use openmp; then - # based on _fortran-has-openmp() of fortran-2.eclass - local openmp="" - local fcode=ebuild-openmp-flags.f - local _fc=$(tc-getFC) - - pushd "${T}" - cat <<- EOF > "${fcode}" - 1 call omp_get_num_threads - 2 end - EOF - - for openmp in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do - "${_fc}" "${openmp}" "${fcode}" -o "${fcode}.x" && break - done - - rm -f "${fcode}.*" - popd - - append-flags "${openmp}" - fi - - use python && python-single-r1_pkg_setup -} - -src_unpack() { - unpack ${A} - mv "${LONG_S}" "${S}" -} - -src_prepare() { - pushd "${S}"/src - for p in Util_md_sockets Hbar Tcenxtask Parallelmpi Makefile_gcc4x Bcast_ccsd Elpa_syncs Xlmpoles_ifort15 - do epatch "${WORKDIR}"/"${p}.patch" - done - cd NWints/hondo - epatch "${WORKDIR}"/Hnd_giaxyz_noinline.patch - popd - epatch "${FILESDIR}"/nwchem-6.1.1-nwchemrc.patch - use python && epatch "${FILESDIR}"/nwchem-6.5-python_makefile.patch - use doc && epatch "${FILESDIR}"/nwchem-6.3-r1-html_doc.patch - - sed \ - -e "s:DBASIS_LIBRARY=\"'\$(SRCDIR)'\":DBASIS_LIBRARY=\"'${EPREFIX}/usr/share/NWChem'\":g" \ - -i src/basis/MakeFile src/basis/GNUmakefile || die - sed \ - -e "s:DNWPW_LIBRARY=\"'\$(SRCDIR)'\":DNWPW_LIBRARY=\"'${EPREFIX}/usr/share/NWChem'\":g" \ - -i src/nwpw/libraryps/GNUmakefile || die - sed \ - -e "s:-DCOMPILATION_DIR=\"'\$(TOPDIR)'\":-DCOMPILATION_DIR=\"''\":g" \ - -i src/GNUmakefile src/MakeFile || die - - if [[ $(tc-getFC) == *-*-*-*-gfortran ]]; then - sed \ - -e "s:ifneq (\$(FC),gfortran):ifneq (\$(FC),$(tc-getFC)):g" \ - -e "s:ifeq (\$(FC),gfortran):ifeq (\$(FC),$(tc-getFC)):g" \ - -i src/config/makefile.h || die - fi -} - -src_compile() { - export NWCHEM_LONG_PATHS=Y - export USE_SUBGROUPS=yes - if use mpi ; then - export MSG_COMMS=MPI - export USE_MPI=y - export USE_MPIF=y - export USE_MPIF4=y - export MPI_LOC="${EPREFIX}"/usr - export MPI_INCLUDE=$MPI_LOC/include - export MPI_LIB=$MPI_LOC/$(get_libdir) - export LIBMPI="$(mpif90 -showme:link)" - if use infiniband; then - export ARMCI_NETWORK=OPENIB - else - export ARMCI_NETWORK=MPI-TS - fi - else - unset USE_MPI - unset USE_MPIF - unset USE_MPIF4 - export MSG_COMMS=TCGMSG - export ARMCI_NETWORK=SOCKETS - fi - if [ "$ARCH" = "amd64" ]; then - export NWCHEM_TARGET=LINUX64 - elif [ "$ARCH" = "ia64" ]; then - export NWCHEM_TARGET=LINUX64 - elif [ "$ARCH" = "x86" ]; then - export NWCHEM_TARGET=LINUX - elif [ "$ARCH" = "ppc" ]; then - export NWCHEM_TARGET=LINUX - else - die "Unknown architecture" - fi - if use python ; then - if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "ia64" ]; then - export USE_PYTHON64=yes - fi - export PYTHONHOME=/usr - export PYTHONVERSION=$(eselect python show --python2 |awk -Fpython '{ print $2 }') - export PYTHONPATH="./:${S}/contrib/python/" - export NWCHEM_MODULES="all python" - else - export NWCHEM_MODULES="all" - fi - use mrcc && export MRCC_THEORY="TRUE" - export CCSDTQ="TRUE" - export CCSDTLR="TRUE" - unset BLASOPT - use blas && BLASOPT="$(pkg-config --libs blas)" - use lapack && BLASOPT+="$(pkg-config --libs lapack)" - use scalapack && BLASOPT+="$(pkg-config --libs scalapack)" - export BLASOPT - if use int64; then - BLAS_SIZE=8 - LAPACK_SIZE=8 - SCALAPACK_SIZE=8 - else - BLAS_SIZE=4 - LAPACK_SIZE=4 - SCALAPACK_SIZE=4 - fi - if use cuda; then - export TCE_CUDA=Y - export CUDA_PATH=/opt/cuda - export CUDA=${CUDA_PATH}/bin/nvcc - export CUDA_FLAGS="-arch=compute_20 -code=sm_20,compute_20" - export CUDA_INCLUDE="-I${CUDA_PATH}/include" - export CUDA_LIBS="-L${CUDA_PATH}/$(get_libdir) -lcublas -lcufft -lcudart -lcuda" - fi - export LARGE_FILES="TRUE" - - cd src - emake \ - DIAG=PAR \ - FC=$(tc-getFC) \ - CC=$(tc-getCC) \ - CXX=$(tc-getCXX) \ - NWCHEM_TOP="${S}" \ - NWCHEM_EXECUTABLE="${S}/bin/${NWCHEM_TARGET}/nwchem" - - if use doc; then - cd "${S}"/doc - export VARTEXFONTS="${T}/fonts" - emake \ - DIAG=PAR \ - NWCHEM_TOP="${S}" \ - pdf html - fi -} - -src_install() { - dobin bin/${NWCHEM_TARGET}/nwchem - - insinto /usr/share/NWChem/basis/ - doins -r src/basis/libraries src/data - insinto /usr/share/NWChem/nwpw - doins -r src/nwpw/libraryps - - insinto /etc - doins nwchemrc - - use examples && \ - insinto /usr/share/NWChem/ && \ - doins -r examples - - use nwchem-tests && \ - insinto /usr/share/NWChem && \ - doins -r QA/tests - - use doc && \ - insinto /usr/share/doc/"${P}" && \ - doins -r doc/nwahtml && \ - doins -r web - -} - -pkg_postinst() { - echo - elog "The user will need to link \$HOME/.nwchemrc to /etc/nwchemrc" - elog "or copy it in order to tell NWChem the right position of the" - elog "basis library and other necessary data." - echo -} -- cgit v1.2.3