Gentoo Archives: gentoo-commits

From: Christoph Junghans <kleiner_otti@×××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-chemistry/gromacs/
Date: Tue, 27 Nov 2012 05:43:38
Message-Id: 1353994128.7b59ade8bd1189a3300d561b64f2d4f945717003.kleiner_otti@gentoo
1 commit: 7b59ade8bd1189a3300d561b64f2d4f945717003
2 Author: Christoph Junghans <ottxor <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 27 05:28:09 2012 +0000
4 Commit: Christoph Junghans <kleiner_otti <AT> gmx <DOT> de>
5 CommitDate: Tue Nov 27 05:28:48 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=7b59ade8
7
8 added openmm support
9
10 Package-Manager: portage-2.2.0_alpha142
11
12 ---
13 sci-chemistry/gromacs/ChangeLog | 4 +++
14 sci-chemistry/gromacs/gromacs-4.6.9999.ebuild | 30 ++++++++++++++++++------
15 sci-chemistry/gromacs/metadata.xml | 1 +
16 3 files changed, 27 insertions(+), 8 deletions(-)
17
18 diff --git a/sci-chemistry/gromacs/ChangeLog b/sci-chemistry/gromacs/ChangeLog
19 index afe6602..00923e8 100644
20 --- a/sci-chemistry/gromacs/ChangeLog
21 +++ b/sci-chemistry/gromacs/ChangeLog
22 @@ -2,6 +2,10 @@
23 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
24 # $Header: $
25
26 + 27 Nov 2012; Christoph Junghans <ottxor@g.o> gromacs-4.6.9999.ebuild,
27 + metadata.xml:
28 + added openmm support
29 +
30 19 Nov 2012; Christoph Junghans <ottxor@g.o> gromacs-4.6.9999.ebuild:
31 live ebuild update
32
33
34 diff --git a/sci-chemistry/gromacs/gromacs-4.6.9999.ebuild b/sci-chemistry/gromacs/gromacs-4.6.9999.ebuild
35 index 1ddd82a..9b7b66f 100644
36 --- a/sci-chemistry/gromacs/gromacs-4.6.9999.ebuild
37 +++ b/sci-chemistry/gromacs/gromacs-4.6.9999.ebuild
38 @@ -33,11 +33,10 @@ DESCRIPTION="The ultimate molecular dynamics simulation package"
39 HOMEPAGE="http://www.gromacs.org/"
40
41 LICENSE="GPL-2"
42 -#every useflag combination and git commit could be binary different
43 -SLOT="0/$(date +%s)"
44 +SLOT="0"
45 KEYWORDS="~alpha ~amd64 ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
46 IUSE="X blas cuda doc -double-precision +fftw gsl lapack
47 -mpi openmp +single-precision test +threads zsh-completion ${ACCE_IUSE}"
48 +mpi openmm openmp +single-precision test +threads zsh-completion ${ACCE_IUSE}"
49
50 CDEPEND="
51 X? (
52 @@ -51,14 +50,15 @@ CDEPEND="
53 fkernels? ( !threads? ( !sse2? ( virtual/fortran ) ) )
54 gsl? ( sci-libs/gsl )
55 lapack? ( virtual/lapack )
56 - mpi? ( virtual/mpi )"
57 + mpi? ( virtual/mpi )
58 + openmm? ( sci-libs/openmm[cuda,opencl] )"
59 DEPEND="${CDEPEND}
60 virtual/pkgconfig"
61 RDEPEND="${CDEPEND}"
62
63 RESTRICT="test"
64
65 -REQUIRED_USE="cuda? ( single-precision )"
66 +REQUIRED_USE="cuda? ( single-precision ) openmm? ( single-precision cuda )"
67
68 pkg_pretend() {
69 [[ $(gcc-version) == "4.1" ]] && die "gcc 4.1 is not supported by gromacs"
70 @@ -70,7 +70,6 @@ pkg_setup() {
71 #notes/todos
72 # -on apple: there is framework support
73 # -mkl support
74 - # -openmm support
75 # -there are power6 kernels
76 if use fkernels; then
77 if use threads; then
78 @@ -143,6 +142,14 @@ src_configure() {
79 $(cmake-utils_use threads GMX_THREAD_MPI) ${cuda}
80 -DGMX_BINARY_SUFFIX="${suffix}" -DGMX_LIBS_SUFFIX="${suffix}" )
81 CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}" cmake-utils_src_configure
82 + if [[ ${x} = float ]] && use openmm; then
83 + einfo "Configuring for openmm build"
84 + mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=OFF
85 + -DGMX_THREAD_MPI=OFF -DGMX_GPU=OFF -DGMX_OPENMM=ON
86 + -DGMX_BINARY_SUFFIX="openmm" -DGMX_LIBS_SUFFIX="openmm" )
87 + CMAKE_BUILD_DIR="${WORKDIR}/${P}_openmm" \
88 + OPENMM_ROOT_DIR="${EPREFIX}/usr" cmake-utils_src_configure
89 + fi
90 use mpi || continue
91 einfo "Configuring for ${x} precision with mpi"
92 mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_THREAD_MPI=OFF
93 @@ -157,6 +164,11 @@ src_compile() {
94 einfo "Compiling for ${x} precision"
95 CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}"\
96 cmake-utils_src_compile
97 + if [[ ${x} = float ]] && use openmm; then
98 + einfo "Compiling for openmm build"
99 + CMAKE_BUILD_DIR="${WORKDIR}/${P}_openmm"\
100 + cmake-utils_src_compile mdrun
101 + fi
102 use mpi || continue
103 einfo "Compiling for ${x} precision with mpi"
104 CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}_mpi"\
105 @@ -178,9 +190,11 @@ src_install() {
106 for x in ${GMX_DIRS}; do
107 CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}" \
108 cmake-utils_src_install
109 + if [[ ${x} = float ]] && use openmm; then
110 + CMAKE_BUILD_DIR="${WORKDIR}/${P}_openmm" \
111 + DESTDIR="${D}" cmake-utils_src_make install-mdrun
112 + fi
113 use mpi || continue
114 - #cmake-utils_src_install does not support args
115 - #using cmake-utils_src_make instead
116 CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \
117 DESTDIR="${D}" cmake-utils_src_make install-mdrun
118 done
119
120 diff --git a/sci-chemistry/gromacs/metadata.xml b/sci-chemistry/gromacs/metadata.xml
121 index acbcd53..41931c0 100644
122 --- a/sci-chemistry/gromacs/metadata.xml
123 +++ b/sci-chemistry/gromacs/metadata.xml
124 @@ -15,6 +15,7 @@
125 <flag name="sse41">Enable sse4.1 acceleration</flag>
126 <flag name="avx128fma">Enable 128bit avx with fma (e.g. AMD BullDozer)</flag>
127 <flag name="avx256">Enable 256bit avx (e.g. Intel Sandy Bridge)</flag>
128 + <flag name="openmm">Add acceleration through <pkg>sci-libs/openmm</pkg></flag>
129 <flag name="power6">Enable Power6 optimizations</flag>
130 </use>
131 </pkgmetadata>