Gentoo Archives: gentoo-commits

From: Alexey Shvetsov <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-chemistry/gromacs/
Date: Thu, 05 Dec 2013 03:41:27
Message-Id: 1386214867.3b3b3c81eb3f813d2d1de5ad5894121a04f04e6d.alexxy@gentoo
1 commit: 3b3b3c81eb3f813d2d1de5ad5894121a04f04e6d
2 Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 5 03:41:07 2013 +0000
4 Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 5 03:41:07 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=3b3b3c81
7
8 Drop 4.5
9
10 Package-Manager: portage-2.2.7
11
12 ---
13 sci-chemistry/gromacs/ChangeLog | 4 +
14 sci-chemistry/gromacs/gromacs-4.5.9999.ebuild | 242 --------------------------
15 sci-chemistry/gromacs/metadata.xml | 1 -
16 3 files changed, 4 insertions(+), 243 deletions(-)
17
18 diff --git a/sci-chemistry/gromacs/ChangeLog b/sci-chemistry/gromacs/ChangeLog
19 index 732b917..996e1d9 100644
20 --- a/sci-chemistry/gromacs/ChangeLog
21 +++ b/sci-chemistry/gromacs/ChangeLog
22 @@ -2,6 +2,10 @@
23 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
24 # $Header: $
25
26 + 05 Dec 2013; Alexey Shvetsov <alexxy@g.o> -Manifest,
27 + -gromacs-4.5.9999.ebuild, metadata.xml:
28 + Drop 4.5
29 +
30 05 Dec 2013; Alexey Shvetsov <alexxy@g.o> gromacs-9999.ebuild:
31 Update live ebuild to current state
32
33
34 diff --git a/sci-chemistry/gromacs/gromacs-4.5.9999.ebuild b/sci-chemistry/gromacs/gromacs-4.5.9999.ebuild
35 deleted file mode 100644
36 index b5ed085..0000000
37 --- a/sci-chemistry/gromacs/gromacs-4.5.9999.ebuild
38 +++ /dev/null
39 @@ -1,242 +0,0 @@
40 -# Copyright 1999-2013 Gentoo Foundation
41 -# Distributed under the terms of the GNU General Public License v2
42 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/gromacs-4.5.7.ebuild,v 1.2 2013/05/05 17:31:09 ottxor Exp $
43 -
44 -EAPI="4"
45 -
46 -TEST_PV="4.0.4"
47 -MANUAL_PV="4.5.6"
48 -
49 -FORTRAN_NEEDED=fkernels
50 -
51 -inherit bash-completion-r1 cmake-utils eutils fortran-2 multilib toolchain-funcs
52 -
53 -SRC_URI="test? ( ftp://ftp.gromacs.org/pub/tests/gmxtest-${TEST_PV}.tgz )
54 - doc? ( ftp://ftp.gromacs.org/pub/manual/manual-${MANUAL_PV}.pdf -> gromacs-manual-${MANUAL_PV}.pdf )"
55 -
56 -if [ "${PV%9999}" != "${PV}" ]; then
57 - EGIT_REPO_URI="git://git.gromacs.org/gromacs http://repo.or.cz/r/gromacs.git"
58 - EGIT_BRANCH="release-4-5-patches"
59 - inherit git-2
60 -else
61 - SRC_URI="${SRC_URI} ftp://ftp.gromacs.org/pub/${PN}/${P}.tar.gz
62 - sse2? ( http://dev.gentoo.org/~alexxy/gromacs/0001-Make-stack-non-executable-for-GAS-assembly.patch.gz )
63 - sse2? ( http://dev.gentoo.org/~alexxy/gromacs/0002-Make-stack-non-executable-for-ATT-assembly.patch.gz )"
64 -fi
65 -
66 -DESCRIPTION="The ultimate molecular dynamics simulation package"
67 -HOMEPAGE="http://www.gromacs.org/"
68 -
69 -LICENSE="GPL-2"
70 -SLOT="0"
71 -KEYWORDS="~alpha ~amd64 ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
72 -IUSE="X altivec blas doc -double-precision +fftw fkernels gsl lapack
73 -mpi +single-precision sse2 test +threads xml zsh-completion"
74 -REQUIRED_USE="fkernels? ( !threads )"
75 -
76 -CDEPEND="
77 - X? (
78 - x11-libs/libX11
79 - x11-libs/libSM
80 - x11-libs/libICE
81 - )
82 - blas? ( virtual/blas )
83 - fftw? ( sci-libs/fftw:3.0 )
84 - gsl? ( sci-libs/gsl )
85 - lapack? ( virtual/lapack )
86 - mpi? ( virtual/mpi )
87 - xml? ( dev-libs/libxml2:2 )"
88 -DEPEND="${CDEPEND}
89 - virtual/pkgconfig"
90 -RDEPEND="${CDEPEND}
91 - app-shells/tcsh"
92 -
93 -RESTRICT="test"
94 -
95 -src_prepare() {
96 - #add user patches from /etc/portage/patches/sci-chemistry/gromacs
97 - epatch_user
98 -
99 - if use mpi && use threads; then
100 - elog "mdrun uses only threads OR mpi, and gromacs favours the"
101 - elog "use of mpi over threads, so a mpi-version of mdrun will"
102 - elog "be compiled. If you want to run mdrun on shared memory"
103 - elog "machines only, you can safely disable mpi"
104 - fi
105 -
106 - if [[ ${PV} != *9999 ]] && use sse2; then
107 - # Add patches for non-exec stack - qa issue
108 - epatch "${WORKDIR}/0001-Make-stack-non-executable-for-GAS-assembly.patch"
109 - epatch "${WORKDIR}/0002-Make-stack-non-executable-for-ATT-assembly.patch"
110 - #alexxy patches, renamve kernel from .s to .S
111 - epatch "${FILESDIR}/${P}-cmake-cpp-asm.patch"
112 - fi
113 -
114 - GMX_DIRS=""
115 - use single-precision && GMX_DIRS+=" float"
116 - use double-precision && GMX_DIRS+=" double"
117 - #if neither single-precision nor double-precision is enabled
118 - #build at least default (single)
119 - [ -z "$GMX_DIRS" ] && GMX_DIRS+=" float"
120 -
121 - for x in ${GMX_DIRS}; do
122 - mkdir -p "${WORKDIR}/${P}_${x}" || die
123 - use test && cp -r "${WORKDIR}"/gmxtest "${WORKDIR}/${P}_${x}"
124 - done
125 -}
126 -
127 -src_configure() {
128 - local mycmakeargs_pre=( )
129 - #from gromacs configure
130 - if use fftw; then
131 - mycmakeargs_pre+=("-DGMX_FFT_LIBRARY=fftw3")
132 - else
133 - mycmakeargs_pre+=("-DGMX_FFT_LIBRARY=fftpack")
134 - ewarn "WARNING: The built-in FFTPACK routines are slow."
135 - ewarn "Are you sure you don\'t want to use FFTW?"
136 - ewarn "It is free and much faster..."
137 - fi
138 -
139 - if [[ $(gcc-version) == "4.1" ]]; then
140 - eerror "gcc 4.1 is not supported by gromacs"
141 - eerror "please run test suite"
142 - die
143 - fi
144 -
145 - #note for gentoo-PREFIX on apple: use --enable-apple-64bit
146 -
147 - #note for gentoo-PREFIX on aix, fortran (xlf) is still much faster
148 - if use fkernels; then
149 - ewarn "Fortran kernels are usually not faster than C kernels and assembly"
150 - ewarn "I hope, you know what are you doing..."
151 - fi
152 -
153 - if use double-precision ; then
154 - #from gromacs manual
155 - elog
156 - elog "For most simulations single precision is accurate enough. In some"
157 - elog "cases double precision is required to get reasonable results:"
158 - elog
159 - elog "-normal mode analysis, for the conjugate gradient or l-bfgs minimization"
160 - elog " and the calculation and diagonalization of the Hessian "
161 - elog "-calculation of the constraint force between two large groups of atoms"
162 - elog "-energy conservation: this can only be done without temperature coupling and"
163 - elog " without cutoffs"
164 - elog
165 - fi
166 -
167 - if use mpi ; then
168 - elog "You have enabled mpi, only mdrun will make use of mpi, that is why"
169 - elog "we configure/compile gromacs twice (with and without mpi) and only"
170 - elog "install mdrun with mpi support. In addtion you will get libgmx and"
171 - elog "libmd with and without mpi support."
172 - fi
173 -
174 - #go from slowest to fasterest acceleration
175 - local acce="none"
176 - use fkernels && acce="fortran"
177 - use altivec && acce="altivec"
178 - use ia64 && acce="ia64"
179 - use sse2 && acce="sse"
180 -
181 - mycmakeargs_pre+=(
182 - $(cmake-utils_use X GMX_X11)
183 - $(cmake-utils_use blas GMX_EXTERNAL_BLAS)
184 - $(cmake-utils_use gsl GMX_GSL)
185 - $(cmake-utils_use lapack GMX_EXTERNAL_LAPACK)
186 - $(cmake-utils_use threads GMX_THREADS)
187 - $(cmake-utils_use xml GMX_XML)
188 - -DGMX_DEFAULT_SUFFIX=off
189 - -DGMX_ACCELERATION="$acce"
190 - -DGMXLIB="$(get_libdir)"
191 - )
192 -
193 - for x in ${GMX_DIRS}; do
194 - einfo "Configuring for ${x} precision"
195 - local suffix=""
196 - #if we build single and double - double is suffixed
197 - use double-precision && use single-precision && \
198 - [ "${x}" = "double" ] && suffix="_d"
199 - local p
200 - [ "${x}" = "double" ] && p="-DGMX_DOUBLE=ON" || p="-DGMX_DOUBLE=OFF"
201 - mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=OFF
202 - -DGMX_BINARY_SUFFIX="${suffix}" -DGMX_LIBS_SUFFIX="${suffix}" )
203 - BUILD_DIR="${WORKDIR}/${P}_${x}" cmake-utils_src_configure
204 - use mpi || continue
205 - einfo "Configuring for ${x} precision with mpi"
206 - mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=ON
207 - -DGMX_BINARY_SUFFIX="_mpi${suffix}" -DGMX_LIBS_SUFFIX="_mpi${suffix}" )
208 - BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" cmake-utils_src_configure
209 - done
210 -}
211 -
212 -src_compile() {
213 - for x in ${GMX_DIRS}; do
214 - einfo "Compiling for ${x} precision"
215 - BUILD_DIR="${WORKDIR}/${P}_${x}"\
216 - cmake-utils_src_compile
217 - use mpi || continue
218 - einfo "Compiling for ${x} precision with mpi"
219 - BUILD_DIR="${WORKDIR}/${P}_${x}_mpi"\
220 - cmake-utils_src_compile mdrun
221 - done
222 -}
223 -
224 -src_test() {
225 - for x in ${GMX_DIRS}; do
226 - local oldpath="${PATH}"
227 - export PATH="${WORKDIR}/${P}_${x}/src/kernel:${S}-{x}/src/tools:${PATH}"
228 - cd "${WORKDIR}/${P}_${x}"
229 - emake -j1 tests || die "${x} Precision test failed"
230 - export PATH="${oldpath}"
231 - done
232 -}
233 -
234 -src_install() {
235 - for x in ${GMX_DIRS}; do
236 - BUILD_DIR="${WORKDIR}/${P}_${x}" \
237 - cmake-utils_src_install
238 - use mpi || continue
239 - #cmake-utils_src_install does not support args
240 - #using cmake-utils_src_compile instead
241 - BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \
242 - cmake-utils_src_make install-mdrun DESTDIR="${D}"
243 - done
244 -
245 - sed -n -e '/^GMXBIN/,/^GMXDATA/p' "${ED}"/usr/bin/GMXRC.bash > "${T}/80gromacs"
246 - echo "VMD_PLUGIN_PATH=${EPREFIX}/usr/$(get_libdir)/vmd/plugins/*/molfile/" >> "${T}/80gromacs"
247 -
248 - doenvd "${T}/80gromacs"
249 - rm -f "${ED}"/usr/bin/GMXRC*
250 -
251 - newbashcomp "${ED}"/usr/bin/completion.bash ${PN}
252 - if use zsh-completion ; then
253 - insinto /usr/share/zsh/site-functions
254 - newins "${ED}"/usr/bin/completion.zsh _${PN}
255 - fi
256 - rm -f "${ED}"/usr/bin/completion.*
257 -
258 - # Fix typos in a couple of files.
259 - sed -e "s:+0f:-f:" -i "${ED}"usr/share/gromacs/tutor/gmxdemo/demo \
260 - || die "Failed to fixup demo script."
261 -
262 - cd "${S}"
263 - dodoc AUTHORS INSTALL* README*
264 - if use doc; then
265 - newdoc "${DISTDIR}/gromacs-manual-${MANUAL_PV}.pdf" "manual-${MANUAL_PV}.pdf"
266 - dohtml -r "${ED}usr/share/gromacs/html/"
267 - fi
268 - rm -rf "${ED}usr/share/gromacs/html/"
269 -}
270 -
271 -pkg_postinst() {
272 - einfo
273 - einfo "Please read and cite:"
274 - einfo "Gromacs 4, J. Chem. Theory Comput. 4, 435 (2008). "
275 - einfo "http://dx.doi.org/10.1021/ct700301q"
276 - einfo
277 - einfo $(g_luck)
278 - einfo "For more Gromacs cool quotes (gcq) add g_luck to your .bashrc"
279 - einfo
280 - elog "Gromacs can use sci-chemistry/vmd to read additional file formats"
281 -}
282
283 diff --git a/sci-chemistry/gromacs/metadata.xml b/sci-chemistry/gromacs/metadata.xml
284 index 8a88d53..880233e 100644
285 --- a/sci-chemistry/gromacs/metadata.xml
286 +++ b/sci-chemistry/gromacs/metadata.xml
287 @@ -11,7 +11,6 @@
288 <flag name="double-precision">More precise calculations at the expense of speed</flag>
289 <flag name="single-precision">Single precision version of gromacs (default)</flag>
290 <!-- acceleration optimization flags -->
291 - <flag name="fkernels">Enable building of Fortran Kernels for platforms that dont have assembly loops</flag>
292 <flag name="sse4_1">Enable sse4.1 acceleration</flag>
293 <flag name="avx128fma">Enable 128bit avx with fma (e.g. AMD BullDozer)</flag>
294 <flag name="avx256">Enable 256bit avx (e.g. Intel Sandy Bridge)</flag>