From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QEnAO-0003Ay-LX for garchives@archives.gentoo.org; Tue, 26 Apr 2011 18:39:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9DF021C009; Tue, 26 Apr 2011 18:39:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4A06D1C009 for ; Tue, 26 Apr 2011 18:39:13 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 256271B401F for ; Tue, 26 Apr 2011 18:39:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 4B70580505 for ; Tue, 26 Apr 2011 18:39:11 +0000 (UTC) From: "Dongxu Li" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Dongxu Li" Message-ID: Subject: [gentoo-commits] proj/sci:master commit in: sci-physics/abinit/ X-VCS-Repository: proj/sci X-VCS-Files: sci-physics/abinit/ChangeLog sci-physics/abinit/abinit-6.6.2.ebuild sci-physics/abinit/metadata.xml X-VCS-Directories: sci-physics/abinit/ X-VCS-Committer: dongxuli X-VCS-Committer-Name: Dongxu Li X-VCS-Revision: f55378a9416f3bf62066e40e484e44f45407a300 Date: Tue, 26 Apr 2011 18:39:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: fa85a5118abbc62821b7555833cc4398 commit: f55378a9416f3bf62066e40e484e44f45407a300 Author: Dongxu Li gmail com> AuthorDate: Tue Apr 26 18:38:21 2011 +0000 Commit: Dongxu Li gmail com> CommitDate: Tue Apr 26 18:38:21 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/sci.git;a=3Dc= ommit;h=3Df55378a9 sci-physics/abinit: version bump to 6.6.2 --- sci-physics/abinit/ChangeLog | 3 + sci-physics/abinit/abinit-6.6.2.ebuild | 221 ++++++++++++++++++++++++++= ++++++ sci-physics/abinit/metadata.xml | 23 ++++ 3 files changed, 247 insertions(+), 0 deletions(-) diff --git a/sci-physics/abinit/ChangeLog b/sci-physics/abinit/ChangeLog index 78e3079..62cefbe 100644 --- a/sci-physics/abinit/ChangeLog +++ b/sci-physics/abinit/ChangeLog @@ -4,6 +4,9 @@ =20 *abinit-6.6.1 (07 Mar 2011) =20 + 26 Apr 2011; Dongxu Li +abinit-6.6.2.ebuild += metadata.xml: + Version bump to 6.6.2. Cleaned up old versions for numerous quality co= ntrol issues. + 09 Apr 2011; Dongxu Li abinit-6.6.1.ebuild: Simple fix of a building issue due to FFTW. Disabled fftw-threads. diff --git a/sci-physics/abinit/abinit-6.6.2.ebuild b/sci-physics/abinit/= abinit-6.6.2.ebuild new file mode 100644 index 0000000..12fab38 --- /dev/null +++ b/sci-physics/abinit/abinit-6.6.2.ebuild @@ -0,0 +1,221 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3D"3" + +inherit autotools eutils multilib toolchain-funcs + +DESCRIPTION=3D"Find total energy, charge density and electronic structur= e using density functional theory" +HOMEPAGE=3D"http://www.abinit.org/" +SRC_URI=3D"http://ftp.abinit.org/${P}.tar.gz" + +LICENSE=3D"GPL-2" +SLOT=3D"0" +KEYWORDS=3D"~amd64 ~x86" +IUSE=3D"cuda -debug +fftw +fox gsl +hdf5 mpi +netcdf python -smp +thread= s -test -vdwxc" + +RDEPEND=3D"=3Dsci-libs/bigdft-1.2.0.2 + sci-libs/etsf_io + =3Dsci-libs/libxc-1.0[fortran] + sci-physics/atompaw[libxc] + fox? ( sci-libs/fox[dom,sax,wcml,wxml] ) + netcdf? ( + sci-libs/netcdf[fortran] + hdf5? ( + sci-libs/netcdf[fortran,hdf5] + ) + ) + hdf5? ( sci-libs/hdf5[fortran] ) + sci-libs/wannier90 + virtual/blas + virtual/lapack + gsl? ( sci-libs/gsl ) + fftw? ( + sci-libs/fftw:3.0 + threads? ( sci-libs/fftw:3.0[threads] ) + ) + mpi? ( virtual/mpi ) + python? ( dev-python/numpy ) + x86? ( + cuda? ( dev-util/nvidia-cuda-sdk ) + ) + amd64? ( + cuda? ( dev-util/nvidia-cuda-sdk ) + ) + " + +DEPEND=3D"${RDEPEND} + dev-util/pkgconfig + dev-perl/Text-Markdown" + +#WANT_AUTOCONF=3D"latest" +#WANT_AUTOMAKE=3D"latest" + +S=3D${WORKDIR}/${P%[a-z]} + +pkg_setup() { + # Doesn't compile with gcc-4.0, only >=3D4.1 + if [[ $(tc-getFC) =3D=3D *gfortran ]]; then + if [[ $(gcc-major-version) -eq 4 ]] \ + && [[ $(gcc-minor-version) -lt 1 ]]; then + die "Requires gcc-4.1 or newer" + fi + fi + if use smp; then + ewarn "OpenMP support mostly broken. Apparently some developers \ + have used OpenMP semaphors !$ as comment delimiters. Not yet solved \ + upstream, patch incomplete." + if use mpi && has_version sys-cluster/openmpi; then + ewarn "Combined with openMPI, OpenMP support is especially likely to = crash." + fi + fi +} + +src_prepare() { + epatch "${FILESDIR}"/6.2.2-change-default-directories.patch + epatch "${FILESDIR}"/6.0.3-fftw.patch + epatch "${FILESDIR}"/6.6.1-openmp.patch + eautoreconf +} + +src_configure() { + local libs=3D"-L/usr/$(get_libdir)" + local modules=3D"-I/usr/$(get_libdir)/finclude" + local FoX_libs=3D"${libs} -lFoX_dom -lFoX_sax -lFoX_wcml -lFoX_wxml -lF= oX_common -lFoX_utils -lFoX_fsys" + local trio_flavor=3D"etsf_io" + use fox && trio_flavor=3D"${trio_flavor}+fox" + use netcdf && trio_flavor=3D"${trio_flavor}+netcdf" + local netcdff_libs=3D"-lnetcdff" + use hdf5 && netcdff_libs=3D"${netcdff_libs} -lhdf5_fortran" + local fft_flavor=3D"fftw3" + local fft_libs=3D"-lfftw3" + fft_libs=3D"${fft_libs} $(pkg-config --libs fftw3)" + #fft_flavor=3D"fftw3-threads" doesn't build for me + #if use threads; then + # fft_libs=3D"${fft_libs} $(pkg-config --libs fftw3_threads)" + # fft_flavor=3D"fftw3-threads" + #else + # fft_libs=3D"${fft_libs} $(pkg-config --libs fftw3)" + #fi + if use mpi; then + MY_FC=3D"mpif90" + MY_CC=3D"mpicc" + MY_CXX=3D"mpic++" + else + MY_FC=3D"$(tc-getFC)" + MY_CC=3D"$(tc-getCC)" + MY_CXX=3D"$(tc-getCXX)" + fi + if use smp; then + MY_FC=3D"${MY_FC} -fopenmp" + MY_CC=3D"${MY_CC} -fopenmp" + MY_CXX=3D"${MY_CXX} -fopenmp" + fi + #enable bindings for ab6 header and libraries + # --enable-bindings + #--with-fc-version=3Df90 --enable-bindings \ + local my_cuda + if use cuda; then + if use x86 || use amd64; then + my_cuda=3D"--enable-gpu --with-gpu-flavor=3Dcuda-single --with-gpu-pre= fix=3D/opt/cuda/" + fi + fi + MARKDOWN=3DMarkdown.pl econf \ + $(use_enable debug debug enhanced) \ + $(use_enable mpi) \ + $(use_enable mpi mpi-io) \ + $(use_enable smp) \ + $(use_enable vdwxc) \ + "$(use gsl && echo "--with-math-flavor=3Dgsl")" \ + "$(use gsl && echo "--with-math-incs=3D$(pkg-config --cflags gsl)")" \ + "$(use gsl && echo "--with-math-libs=3D$(pkg-config --libs gsl)")" \ + --with-linalg-flavor=3D"atlas" \ + --with-linalg-libs=3D"$(pkg-config --libs lapack)" \ + --with-trio-flavor=3D"${trio_flavor}" \ + "$(use netcdf && echo "--with-netcdf-incs=3D-I/usr/include")" \ + "$(use netcdf && echo "--with-netcdf-libs=3D$(pkg-config --libs netcdf= ) ${netcdff_libs}")" \ + "$(use fox && echo "--with-fox-incs=3D${modules}")" \ + "$(use fox && echo "--with-fox-libs=3D${FoX_libs}")" \ + --with-etsf-io-incs=3D"${modules}" \ + --with-etsf-io-libs=3D"${libs} -letsf_io -letsf_io_utils -letsf_io_low= _level" \ + --with-dft-flavor=3D"libxc+bigdft+atompaw+wannier90" \ + --with-libxc-incs=3D"${modules}" \ + --with-libxc-libs=3D"${libs} -lxc" \ + --with-bigdft-incs=3D"${modules}" \ + --with-bigdft-libs=3D"${libs} -lpoissonsolver -lbigdft" \ + --with-atompaw-incs=3D"${modules}" \ + --with-atompaw-libs=3D"${libs} -latompaw" \ + --with-wannier90-bins=3D"/usr/bin" \ + --with-wannier90-incs=3D"${modules}" \ + --with-wannier90-libs=3D"${libs} -lwannier $(pkg-config --libs lapack)= " \ + "$(use fftw && echo "--with-fft-flavor=3D${fft_flavor}")" \ + "$(use fftw && echo "--with-fft-incs=3D-I/usr/include")" \ + "$(use fftw && echo "--with-fft-libs=3D${fft_libs}")" \ + --with-timer-flavor=3D"abinit" \ + FC=3D"${MY_FC}" \ + CC=3D"${MY_CC}" \ + CXX=3D"${MY_CXX}" \ + LD=3D"$(tc-getLD)" \ + FCFLAGS=3D"${FCFLAGS:- ${FFLAGS:- -O2}} ${modules} -I/usr/include" \ + "${my_cuda}" +} + +src_compile() { + emake || die +} + +src_test() { + einfo "The tests take quite a while, on the order of 1-2 hours" + einfo "on an Intel Penryn (2.5 GHz)." + cd "${S}"/tests + emake tests_min || ewarn "Minimal tests failed" + emake tests_paw || ewarn "PAW tests failed" + emake tests_gw || ewarn "GW tests failed" + emake tests_gw_paw || ewarn "GW-PAW tests failed" + emake tests tdft || ewarn "TDFT tests failed" + emake tests_bench || ewarn "Benchmarks failed" + + local REPORT + for REPORT in $(find . -name report); do + REPORT=3D${REPORT#*/} + elog "Parameters and unusual results for ${REPORT%%/*} tests" + echo "Parameters and unusual results for ${REPORT%%/*} tests" >>tests_= summary.txt + while read line; do + elog "${line}" + echo "${line}" >>tests_summary.txt + done \ + < <(grep -v -e succeeded -e passed ${REPORT}) + done + + local testdir + find . -name "tmp-test*" -print | \ + while read testdir; do + if [ -e summary_of_tests.tar ]; then + tar rvf summary_of_tests.tar ${testdir} + else tar cvf summary_of_tests.tar ${testdir} + fi + done + + elog "The full test results will be installed as summary_of_tests.tar.b= z2." + elog "Also a concise report tests_summary.txt is installed." +} + +src_install() { + emake DESTDIR=3D"${D}" install || die "make install failed" + + if use test; then + dodoc tests/tests_summary.txt || ewarn "Copying tests summary failed" + dodoc tests/summary_tests.tar || ewarn "Copying tests results failed" + dodoc tests/summary_of_tests.tar || ewarn "Copying tests results faile= d" + fi + + dodoc KNOWN_PROBLEMS README || die "Copying doc files failed" +} + +pkg_postinst() { + if use test; then + elog "The full test results will be installed as summary_tests.tar.bz2= ." + elog "Also a concise report tests_summary.txt is installed." + fi +} diff --git a/sci-physics/abinit/metadata.xml b/sci-physics/abinit/metadat= a.xml new file mode 100644 index 0000000..f0b9f8d --- /dev/null +++ b/sci-physics/abinit/metadata.xml @@ -0,0 +1,23 @@ + + + +sci + +ABINIT is a package whose main program allows one to find the total ener= gy, charge density and electronic structure of systems made of electrons = and nuclei (molecules and periodic solids) within Density Functional Theo= ry (DFT), using pseudopotentials and a planewave basis. ABINIT also inclu= des options to optimize the geometry according to the DFT forces and stre= sses, or to perform molecular dynamics simulations using these forces, or= to generate dynamical matrices, Born effective charges, and dielectric t= ensors. Excited states can be computed within the Time-Dependent Density = Functional Theory (for molecules), or within Many-Body Perturbation Theor= y (the GW approximation). In addition to the main ABINIT code, different = utility programs are provided. =20 + + + + Enable support for nVidia CUDA + + + + + Enable support for FoX Fortran XML library + + + + + Activate van der Waals exchange-correlation + + +