Gentoo Archives: gentoo-commits

From: "Christoph Junghans (ottxor)" <ottxor@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-chemistry/gromacs: metadata.xml gromacs-4.6_beta1.ebuild ChangeLog
Date: Fri, 30 Nov 2012 21:08:27
Message-Id: 20121130210814.8F80520C65@flycatcher.gentoo.org
1 ottxor 12/11/30 21:08:14
2
3 Modified: metadata.xml ChangeLog
4 Added: gromacs-4.6_beta1.ebuild
5 Log:
6 version bump
7
8 (Portage version: 2.2.0_alpha143/cvs/Linux i686, signed Manifest commit with key C2000586)
9
10 Revision Changes Path
11 1.15 sci-chemistry/gromacs/metadata.xml
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/metadata.xml?rev=1.15&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/metadata.xml?rev=1.15&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/metadata.xml?r1=1.14&r2=1.15
16
17 Index: metadata.xml
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/metadata.xml,v
20 retrieving revision 1.14
21 retrieving revision 1.15
22 diff -u -r1.14 -r1.15
23 --- metadata.xml 9 Mar 2012 00:59:11 -0000 1.14
24 +++ metadata.xml 30 Nov 2012 21:08:14 -0000 1.15
25 @@ -2,10 +2,20 @@
26 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
27 <pkgmetadata>
28 <herd>sci-chemistry</herd>
29 + <maintainer>
30 + <email>ottxor@g.o</email>
31 + <name>Christoph Junghans</name>
32 + </maintainer>
33 <use>
34 + <flag name="cuda">Enable cuda non-bonded kernels</flag>
35 <flag name="double-precision">More precise calculations at the expense of speed</flag>
36 - <flag name="fkernels">Enable building of Fortran Kernels for platforms
37 - that dont have assembly loops</flag>
38 - <flag name="single-precision">Single precision version of gromacs</flag>
39 + <flag name="single-precision">Single precision version of gromacs (default)</flag>
40 + <!-- acceleration optimization flags -->
41 + <flag name="fkernels">Enable building of Fortran Kernels for platforms that dont have assembly loops</flag>
42 + <flag name="sse41">Enable sse4.1 acceleration</flag>
43 + <flag name="avx128fma">Enable 128bit avx with fma (e.g. AMD BullDozer)</flag>
44 + <flag name="avx256">Enable 256bit avx (e.g. Intel Sandy Bridge)</flag>
45 + <flag name="openmm">Add acceleration through <pkg>sci-libs/openmm</pkg></flag>
46 + <flag name="power6">Enable Power6 optimizations</flag>
47 </use>
48 </pkgmetadata>
49
50
51
52 1.111 sci-chemistry/gromacs/ChangeLog
53
54 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.111&view=markup
55 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.111&content-type=text/plain
56 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?r1=1.110&r2=1.111
57
58 Index: ChangeLog
59 ===================================================================
60 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v
61 retrieving revision 1.110
62 retrieving revision 1.111
63 diff -u -r1.110 -r1.111
64 --- ChangeLog 19 Oct 2012 09:50:26 -0000 1.110
65 +++ ChangeLog 30 Nov 2012 21:08:14 -0000 1.111
66 @@ -1,6 +1,12 @@
67 # ChangeLog for sci-chemistry/gromacs
68 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
69 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.110 2012/10/19 09:50:26 jlec Exp $
70 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.111 2012/11/30 21:08:14 ottxor Exp $
71 +
72 +*gromacs-4.6_beta1 (30 Nov 2012)
73 +
74 + 30 Nov 2012; Christoph Junghans <ottxor@g.o> +gromacs-4.6_beta1.ebuild,
75 + metadata.xml:
76 + version bump
77
78 19 Oct 2012; Justin Lecher <jlec@g.o> gromacs-4.5.5-r1.ebuild:
79 Remove virtual/fortran and always call fortran-2_pkg_setup as intend by the
80
81
82
83 1.1 sci-chemistry/gromacs/gromacs-4.6_beta1.ebuild
84
85 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/gromacs-4.6_beta1.ebuild?rev=1.1&view=markup
86 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/gromacs-4.6_beta1.ebuild?rev=1.1&content-type=text/plain
87
88 Index: gromacs-4.6_beta1.ebuild
89 ===================================================================
90 # Copyright 1999-2012 Gentoo Foundation
91 # Distributed under the terms of the GNU General Public License v2
92 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/gromacs-4.6_beta1.ebuild,v 1.1 2012/11/30 21:08:14 ottxor Exp $
93
94 EAPI=5
95
96 TEST_PV="4.0.4"
97 MANUAL_PV="4.6-beta1"
98
99 #to find external blas/lapack
100 CMAKE_MIN_VERSION="2.8.5-r2"
101
102 CMAKE_MAKEFILE_GENERATOR="ninja"
103
104 inherit bash-completion-r1 cmake-utils eutils fortran-2 multilib toolchain-funcs
105
106 SRC_URI="test? ( ftp://ftp.gromacs.org/pub/tests/gmxtest-${TEST_PV}.tgz )"
107
108 if [[ $PV = *9999* ]]; then
109 EGIT_REPO_URI="git://git.gromacs.org/gromacs.git
110 https://gerrit.gromacs.org/gromacs.git
111 git://github.com/gromacs/gromacs.git
112 http://repo.or.cz/r/gromacs.git"
113 EGIT_BRANCH="release-4-6"
114 inherit git-2
115 PDEPEND="doc? ( ~app-doc/gromacs-manual-${PV} )"
116 else
117 S="${WORKDIR}/${P//_/-}"
118 SRC_URI="${SRC_URI} ftp://ftp.gromacs.org/pub/${PN}/${P//_/-}.tar.gz
119 doc? ( ftp://ftp.gromacs.org/pub/manual/gromacs-manual-${MANUAL_PV}.pdf )"
120 fi
121
122 ACCE_IUSE="fkernels power6 sse2 sse41 avx128fma avx256"
123
124 DESCRIPTION="The ultimate molecular dynamics simulation package"
125 HOMEPAGE="http://www.gromacs.org/"
126
127 LICENSE="GPL-2"
128 SLOT="0"
129 KEYWORDS="~alpha ~amd64 ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
130 IUSE="X blas cuda doc -double-precision +fftw gsl lapack
131 mpi openmm openmp +single-precision test +threads zsh-completion ${ACCE_IUSE}"
132
133 CDEPEND="
134 X? (
135 x11-libs/libX11
136 x11-libs/libSM
137 x11-libs/libICE
138 )
139 blas? ( virtual/blas )
140 cuda? ( dev-util/nvidia-cuda-toolkit )
141 fftw? ( sci-libs/fftw:3.0 )
142 fkernels? ( !threads? ( !sse2? ( virtual/fortran ) ) )
143 gsl? ( sci-libs/gsl )
144 lapack? ( virtual/lapack )
145 mpi? ( virtual/mpi )
146 openmm? ( sci-libs/openmm[cuda,opencl] )"
147 DEPEND="${CDEPEND}
148 virtual/pkgconfig"
149 RDEPEND="${CDEPEND}"
150
151 RESTRICT="test"
152
153 REQUIRED_USE="cuda? ( single-precision ) openmm? ( single-precision cuda )"
154
155 pkg_pretend() {
156 [[ $(gcc-version) == "4.1" ]] && die "gcc 4.1 is not supported by gromacs"
157 use openmp && ! tc-has-openmp && \
158 die "Please switch to an openmp compatible compiler"
159 }
160
161 pkg_setup() {
162 #notes/todos
163 # -on apple: there is framework support
164 # -mkl support
165 # -there are power6 kernels
166 if use fkernels; then
167 if use threads; then
168 ewarn "Fortran kernels and threads do not work together, disabling"
169 ewarn "fortran kernels"
170 else
171 fortran-2_pkg_setup
172 fi
173 fi
174 }
175
176 src_prepare() {
177 #add user patches from /etc/portage/patches/sci-chemistry/gromacs
178 epatch_user
179
180 GMX_DIRS=""
181 use single-precision && GMX_DIRS+=" float"
182 use double-precision && GMX_DIRS+=" double"
183 #if neither single-precision nor double-precision is enabled
184 #build at least default (single)
185 [[ -z $GMX_DIRS ]] && GMX_DIRS+=" float"
186
187 for x in ${GMX_DIRS}; do
188 mkdir -p "${WORKDIR}/${P}_${x}" || die
189 use test && cp -r "${WORKDIR}"/gmxtest "${WORKDIR}/${P}_${x}"
190 done
191 }
192
193 src_configure() {
194 local mycmakeargs_pre=( ) extra
195
196 #go from slowest to fastest acceleration
197 local acce="None"
198 use fkernels && use !threads && acce="Fortran"
199 use power6 && acce="Power6"
200 use sse2 && acce="SSE2"
201 use sse41 && acce="SSE4.1"
202 use avx128fma && acce="AVX_128_FMA"
203 use avx256 && acce="AVX_256"
204
205 #to create man pages, build tree binaries are executed (bug #398437)
206 [[ ${CHOST} = *-darwin* ]] && \
207 extra+=" -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF"
208
209 mycmakeargs_pre+=(
210 -DGMX_FFT_LIBRARY=$(usex fftw fftw3 fftwpack)
211 $(cmake-utils_use X GMX_X11)
212 $(cmake-utils_use blas GMX_EXTERNAL_BLAS)
213 $(cmake-utils_use gsl GMX_GSL)
214 $(cmake-utils_use lapack GMX_EXTERNAL_LAPACK)
215 $(cmake-utils_use openmp GMX_OPENMP)
216 -DGMX_DEFAULT_SUFFIX=off
217 -DGMX_ACCELERATION="$acce"
218 -DGMXLIB="$(get_libdir)"
219 -DGMX_VMD_PLUGIN_PATH="${EPREFIX}/usr/$(get_libdir)/vmd/plugins/*/molfile/"
220 ${extra}
221 )
222
223 for x in ${GMX_DIRS}; do
224 einfo "Configuring for ${x} precision"
225 local suffix=""
226 #if we build single and double - double is suffixed
227 use double-precision && use single-precision && \
228 [[ ${x} = "double" ]] && suffix="_d"
229 local p
230 [[ ${x} = "double" ]] && p="-DGMX_DOUBLE=ON" || p="-DGMX_DOUBLE=OFF"
231 local cuda=$(cmake-utils_use cuda GMX_GPU)
232 [[ ${x} = "double" ]] && use cuda && cuda="-DGMX_GPU=OFF"
233 mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=OFF
234 $(cmake-utils_use threads GMX_THREAD_MPI) ${cuda}
235 -DGMX_BINARY_SUFFIX="${suffix}" -DGMX_LIBS_SUFFIX="${suffix}" )
236 CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}" cmake-utils_src_configure
237 if [[ ${x} = float ]] && use openmm; then
238 einfo "Configuring for openmm build"
239 mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=OFF
240 -DGMX_THREAD_MPI=OFF -DGMX_GPU=OFF -DGMX_OPENMM=ON
241 -DGMX_BINARY_SUFFIX="openmm" -DGMX_LIBS_SUFFIX="openmm" )
242 CMAKE_BUILD_DIR="${WORKDIR}/${P}_openmm" \
243 OPENMM_ROOT_DIR="${EPREFIX}/usr" cmake-utils_src_configure
244 fi
245 use mpi || continue
246 einfo "Configuring for ${x} precision with mpi"
247 mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_THREAD_MPI=OFF
248 -DGMX_MPI=ON ${cuda}
249 -DGMX_BINARY_SUFFIX="_mpi${suffix}" -DGMX_LIBS_SUFFIX="_mpi${suffix}" )
250 CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" CC="mpicc" cmake-utils_src_configure
251 done
252 }
253
254 src_compile() {
255 for x in ${GMX_DIRS}; do
256 einfo "Compiling for ${x} precision"
257 CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}"\
258 cmake-utils_src_compile
259 if [[ ${x} = float ]] && use openmm; then
260 einfo "Compiling for openmm build"
261 CMAKE_BUILD_DIR="${WORKDIR}/${P}_openmm"\
262 cmake-utils_src_compile mdrun
263 fi
264 use mpi || continue
265 einfo "Compiling for ${x} precision with mpi"
266 CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}_mpi"\
267 cmake-utils_src_compile mdrun
268 done
269 }
270
271 src_test() {
272 for x in ${GMX_DIRS}; do
273 local oldpath="${PATH}"
274 export PATH="${WORKDIR}/${P}_${x}/src/kernel:${S}-{x}/src/tools:${PATH}"
275 cd "${WORKDIR}/${P}_${x}"
276 emake -j1 tests || die "${x} Precision test failed"
277 export PATH="${oldpath}"
278 done
279 }
280
281 src_install() {
282 for x in ${GMX_DIRS}; do
283 CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}" \
284 cmake-utils_src_install
285 if [[ ${x} = float ]] && use openmm; then
286 CMAKE_BUILD_DIR="${WORKDIR}/${P}_openmm" \
287 DESTDIR="${D}" cmake-utils_src_make install-mdrun
288 fi
289 use mpi || continue
290 CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \
291 DESTDIR="${D}" cmake-utils_src_make install-mdrun
292 done
293
294 rm -f "${ED}"/usr/bin/GMXRC*
295
296 newbashcomp "${ED}"/usr/bin/completion.bash ${PN}
297 if use zsh-completion ; then
298 insinto /usr/share/zsh/site-functions
299 newins "${ED}"/usr/bin/completion.zsh _${PN}
300 fi
301 rm -f "${ED}"/usr/bin/completion.*
302
303 cd "${S}"
304 dodoc AUTHORS INSTALL* README*
305 if use doc; then
306 dohtml -r "${ED}usr/share/gromacs/html/"
307 if [[ $PV = *9999* ]]; then
308 insinto /usr/share/gromacs
309 doins "admin/programs.txt"
310 ls -1 "${ED}"/usr/bin | sed -e '/_d$/d' > "${T}"/programs.list
311 doins "${T}"/programs.list
312 else
313 dodoc "${DISTDIR}/gromacs-manual-${MANUAL_PV}.pdf"
314 fi
315 fi
316 rm -rf "${ED}usr/share/gromacs/html/"
317 }
318
319 pkg_postinst() {
320 einfo
321 einfo "Please read and cite:"
322 einfo "Gromacs 4, J. Chem. Theory Comput. 4, 435 (2008). "
323 einfo "http://dx.doi.org/10.1021/ct700301q"
324 einfo
325 einfo $(g_luck)
326 einfo "For more Gromacs cool quotes (gcq) add g_luck to your .bashrc"
327 einfo
328 elog "Gromacs can use sci-chemistry/vmd to read additional file formats"
329 }