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: Wed, 26 Dec 2012 01:03:46
Message-Id: 1356483785.2b020ade5d2325a779e2d7662c5052122949d59b.kleiner_otti@gentoo
1 commit: 2b020ade5d2325a779e2d7662c5052122949d59b
2 Author: Christoph Junghans <ottxor <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 26 01:03:05 2012 +0000
4 Commit: Christoph Junghans <kleiner_otti <AT> gmx <DOT> de>
5 CommitDate: Wed Dec 26 01:03:05 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=2b020ade
7
8 Added mkl support
9
10 Package-Manager: portage-2.2.0_alpha149
11
12 ---
13 sci-chemistry/gromacs/ChangeLog | 4 ++++
14 sci-chemistry/gromacs/gromacs-4.6.9999.ebuild | 24 +++++++++++++++++++-----
15 sci-chemistry/gromacs/metadata.xml | 1 +
16 3 files changed, 24 insertions(+), 5 deletions(-)
17
18 diff --git a/sci-chemistry/gromacs/ChangeLog b/sci-chemistry/gromacs/ChangeLog
19 index 92c7232..c9d44fb 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 + 26 Dec 2012; Christoph Junghans <ottxor@g.o> gromacs-4.6.9999.ebuild,
27 + metadata.xml:
28 + Added mkl support
29 +
30 22 Dec 2012; Christoph Junghans <ottxor@g.o> gromacs-4.6.9999.ebuild,
31 gromacs-9999.ebuild, metadata.xml:
32 sync with gx86
33
34 diff --git a/sci-chemistry/gromacs/gromacs-4.6.9999.ebuild b/sci-chemistry/gromacs/gromacs-4.6.9999.ebuild
35 index a41494e..cb9c0d4 100644
36 --- a/sci-chemistry/gromacs/gromacs-4.6.9999.ebuild
37 +++ b/sci-chemistry/gromacs/gromacs-4.6.9999.ebuild
38 @@ -38,7 +38,7 @@ HOMEPAGE="http://www.gromacs.org/"
39 LICENSE="GPL-2"
40 SLOT="0"
41 KEYWORDS="~alpha ~amd64 ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
42 -IUSE="X blas cuda doc -double-precision +fftw gsl lapack mpi +offensive openmm openmp +single-precision test +threads zsh-completion ${ACCE_IUSE}"
43 +IUSE="X blas cuda doc -double-precision +fftw gsl lapack mkl mpi +offensive openmm openmp +single-precision test +threads zsh-completion ${ACCE_IUSE}"
44
45 CDEPEND="
46 X? (
47 @@ -51,6 +51,7 @@ CDEPEND="
48 fftw? ( sci-libs/fftw:3.0 )
49 gsl? ( sci-libs/gsl )
50 lapack? ( virtual/lapack )
51 + mkl? ( sci-libs/mkl )
52 mpi? ( virtual/mpi )
53 openmm? ( sci-libs/openmm[cuda,opencl] )"
54 DEPEND="${CDEPEND}
55 @@ -59,7 +60,10 @@ RDEPEND="${CDEPEND}"
56
57 RESTRICT="test"
58
59 -REQUIRED_USE="cuda? ( single-precision ) openmm? ( single-precision cuda )"
60 +REQUIRED_USE="
61 + cuda? ( single-precision )
62 + openmm? ( single-precision )
63 + mkl ( !blas !fftw !lapack )"
64
65 pkg_pretend() {
66 [[ $(gcc-version) == "4.1" ]] && die "gcc 4.1 is not supported by gromacs"
67 @@ -70,7 +74,6 @@ pkg_pretend() {
68 src_prepare() {
69 #notes/todos
70 # -on apple: there is framework support
71 - # -mkl support
72
73 #add user patches from /etc/portage/patches/sci-chemistry/gromacs
74 epatch_user
75 @@ -89,7 +92,7 @@ src_prepare() {
76 }
77
78 src_configure() {
79 - local mycmakeargs_pre=( ) extra
80 + local mycmakeargs_pre=( ) extra fft_opts=( )
81
82 #go from slowest to fastest acceleration
83 local acce="None"
84 @@ -102,8 +105,19 @@ src_configure() {
85 [[ ${CHOST} = *-darwin* ]] && \
86 extra+=" -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF"
87
88 + if use fftw; then
89 + fft_opts=( -DGMX_FFT_LIBRARY=ffw3 )
90 + elif use mkl; then
91 + fft_opts=( -DGMX_FFT_LIBRARY=mkl
92 + -DMKL_INCLUDE_DIR="${MKLROOT}/include"
93 + -DMKL_LIBRARIES="$(echo /opt/intel/mkl/10.0.5.025/lib/*/libmkl.so);$(echo /opt/intel/mkl/10.0.5.025/lib/*/libiomp*.so)"
94 + )
95 + else
96 + fft_opts=( -DGMX_FFT_LIBRARY=fftwpack )
97 + fi
98 +
99 mycmakeargs_pre+=(
100 - -DGMX_FFT_LIBRARY=$(usex fftw fftw3 fftwpack)
101 + "${fft_opts[@]}"
102 $(cmake-utils_use X GMX_X11)
103 $(cmake-utils_use blas GMX_EXTERNAL_BLAS)
104 $(cmake-utils_use gsl GMX_GSL)
105
106 diff --git a/sci-chemistry/gromacs/metadata.xml b/sci-chemistry/gromacs/metadata.xml
107 index 24ddf42..1360fcb 100644
108 --- a/sci-chemistry/gromacs/metadata.xml
109 +++ b/sci-chemistry/gromacs/metadata.xml
110 @@ -17,5 +17,6 @@
111 <flag name="avx256">Enable 256bit avx (e.g. Intel Sandy Bridge)</flag>
112 <flag name="offensive">Enable gromacs partly offensive quotes</flag>
113 <flag name="openmm">Add acceleration through <pkg>sci-libs/openmm</pkg></flag>
114 + <flag name="mkl">Use <pkg>sci-libs/mkl</pkg> for fft, blas, lapack routines</flag>
115 </use>
116 </pkgmetadata>