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