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: Sun, 04 Mar 2012 01:24:56
Message-Id: 1330823645.40d68f6aa3078ab6f35aa06be400a4d6ecffabf7.kleiner_otti@gentoo
1 commit: 40d68f6aa3078ab6f35aa06be400a4d6ecffabf7
2 Author: Christoph Junghans <ottxor <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 4 01:14:05 2012 +0000
4 Commit: Christoph Junghans <kleiner_otti <AT> gmx <DOT> de>
5 CommitDate: Sun Mar 4 01:14:05 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=40d68f6a
7
8 reworked fortran and openmp support
9
10 (Portage version: 2.2.0_alpha89/git/Linux i686, unsigned Manifest commit)
11
12 ---
13 sci-chemistry/gromacs/ChangeLog | 3 ++
14 sci-chemistry/gromacs/gromacs-4.6.9999.ebuild | 36 +++++++++++++++---------
15 2 files changed, 25 insertions(+), 14 deletions(-)
16
17 diff --git a/sci-chemistry/gromacs/ChangeLog b/sci-chemistry/gromacs/ChangeLog
18 index c508a38..62edd24 100644
19 --- a/sci-chemistry/gromacs/ChangeLog
20 +++ b/sci-chemistry/gromacs/ChangeLog
21 @@ -2,6 +2,9 @@
22 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
23 # $Header: $
24
25 + 04 Mar 2012; Christoph Junghans <ottxor@g.o> gromacs-4.6.9999.ebuild:
26 + reworked fortran and openmp support
27 +
28 12 Feb 2012; Christoph Junghans <ottxor@g.o> gromacs-4.6.9999.ebuild:
29 sci-chemistry/gromacs: clean up
30
31
32 diff --git a/sci-chemistry/gromacs/gromacs-4.6.9999.ebuild b/sci-chemistry/gromacs/gromacs-4.6.9999.ebuild
33 index 9ecb639..a036dca 100644
34 --- a/sci-chemistry/gromacs/gromacs-4.6.9999.ebuild
35 +++ b/sci-chemistry/gromacs/gromacs-4.6.9999.ebuild
36 @@ -31,7 +31,6 @@ SLOT="0"
37 KEYWORDS="~alpha ~amd64 ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
38 IUSE="X altivec blas doc -double-precision +fftw fkernels gsl lapack
39 mpi openmp +single-precision sse2 test +threads xml zsh-completion"
40 -REQUIRED_USE="fkernels? ( !threads )"
41
42 CDEPEND="
43 X? (
44 @@ -41,7 +40,7 @@ CDEPEND="
45 )
46 blas? ( virtual/blas )
47 fftw? ( sci-libs/fftw:3.0 )
48 - fkernels? ( virtual/fortran )
49 + fkernels? ( !threads? ( !altivec? ( !ia64? ( !sse2? ( virtual/fortran ) ) ) ) )
50 gsl? ( sci-libs/gsl )
51 lapack? ( virtual/lapack )
52 mpi? ( virtual/mpi )
53 @@ -55,10 +54,27 @@ RESTRICT="test"
54
55 pkg_pretend() {
56 [[ $(gcc-version) == "4.1" ]] && die "gcc 4.1 is not supported by gromacs"
57 + use openmp && ! tc-has-openmp && \
58 + die "Please switch to an openmp compatible compiler"
59 }
60
61 pkg_setup() {
62 - use fkernels && fortran-2_pkg_setup
63 + #notes/todos
64 + # -on apple: there is framework support
65 + # -mkl support
66 + # -there are power6 kernels
67 + if use fkernels; then
68 + if use altivec || use ia64 || use sse2; then
69 + ewarn "Gromacs only supports one acceleration method, in your case"
70 + ewarn "the fortran kernel will be overwritten by (altivec|ia64|sse2)"
71 + ewarn "so it is save to disable fkernels use flag!"
72 + elif use threads; then
73 + ewarn "Fortran kernels and threads do not work together, disabling"
74 + ewarn "fortran kernels"
75 + else
76 + fortran-2_pkg_setup
77 + fi
78 + fi
79 }
80
81 src_prepare() {
82 @@ -81,17 +97,9 @@ src_prepare() {
83 src_configure() {
84 local mycmakeargs_pre=( )
85
86 - #note for gentoo-PREFIX on apple: use --enable-apple-64bit
87 -
88 - #note for gentoo-PREFIX on aix, fortran (xlf) is still much faster
89 - if use fkernels; then
90 - ewarn "Fortran kernels are usually not faster than C kernels and assembly"
91 - ewarn "I hope, you know what are you doing..."
92 - fi
93 -
94 - #go from slowest to fasterest acceleration
95 + #go from slowest to fastest acceleration
96 local acce="none"
97 - use fkernels && acce="fortran"
98 + use fkernels && use !threads && acce="fortran"
99 use altivec && acce="altivec"
100 use ia64 && acce="ia64"
101 use sse2 && acce="sse"
102 @@ -158,7 +166,7 @@ src_install() {
103 cmake-utils_src_install
104 use mpi || continue
105 #cmake-utils_src_install does not support args
106 - #using cmake-utils_src_compile instead
107 + #using cmake-utils_src_make instead
108 CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \
109 cmake-utils_src_make install-mdrun DESTDIR="${D}"
110 done