1 |
alexxy 09/11/30 14:53:59 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: gamess-20090112.3-r1.ebuild |
5 |
Log: |
6 |
[sci-chemistry/gamess] Enable mpi build for gamess-us. It's usefull if you have for example cluster with Infiniband interconnect |
7 |
(Portage version: 2.2_rc54/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.38 sci-chemistry/gamess/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gamess/ChangeLog?rev=1.38&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gamess/ChangeLog?rev=1.38&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gamess/ChangeLog?r1=1.37&r2=1.38 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/ChangeLog,v |
19 |
retrieving revision 1.37 |
20 |
retrieving revision 1.38 |
21 |
diff -u -r1.37 -r1.38 |
22 |
--- ChangeLog 7 Nov 2009 16:21:39 -0000 1.37 |
23 |
+++ ChangeLog 30 Nov 2009 14:53:59 -0000 1.38 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for sci-chemistry/gamess |
26 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/ChangeLog,v 1.37 2009/11/07 16:21:39 volkmar Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/ChangeLog,v 1.38 2009/11/30 14:53:59 alexxy Exp $ |
29 |
+ |
30 |
+*gamess-20090112.3-r1 (30 Nov 2009) |
31 |
+ |
32 |
+ 30 Nov 2009; Alexey Shvetsov <alexxy@g.o> |
33 |
+ +gamess-20090112.3-r1.ebuild: |
34 |
+ Enable mpi build for gamess-us |
35 |
|
36 |
07 Nov 2009; Mounir Lamouri <volkmar@g.o> |
37 |
gamess-20090112.1-r1.ebuild: |
38 |
|
39 |
|
40 |
|
41 |
1.1 sci-chemistry/gamess/gamess-20090112.3-r1.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gamess/gamess-20090112.3-r1.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gamess/gamess-20090112.3-r1.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: gamess-20090112.3-r1.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2009 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/gamess-20090112.3-r1.ebuild,v 1.1 2009/11/30 14:53:59 alexxy Exp $ |
51 |
|
52 |
EAPI="2" |
53 |
|
54 |
inherit eutils toolchain-funcs fortran flag-o-matic |
55 |
|
56 |
DESCRIPTION="A powerful quantum chemistry package" |
57 |
LICENSE="gamess" |
58 |
HOMEPAGE="http://www.msg.chem.iastate.edu/GAMESS/GAMESS.html" |
59 |
SRC_URI=" |
60 |
${P}.tar.gz |
61 |
qmmm-tinker? ( tinker.tar.Z )" |
62 |
|
63 |
SLOT="0" |
64 |
# NOTE: PLEASE do not stabilize gamess. It does not make sense |
65 |
# since the tarball has fetch restrictions and upstream only |
66 |
# provides the latest version. In other words: As soon as a |
67 |
# new version comes out the stable version will be useless since |
68 |
# users can not get at the tarball any more. |
69 |
KEYWORDS="~amd64 ~ppc ~x86" |
70 |
IUSE="hardened mpi qmmm-tinker" |
71 |
|
72 |
RESTRICT="fetch" |
73 |
|
74 |
DEPEND="app-shells/tcsh |
75 |
hardened? ( sys-apps/paxctl ) |
76 |
mpi? ( virtual/mpi ) |
77 |
virtual/blas" |
78 |
|
79 |
RDEPEND="${DEPEND} |
80 |
net-misc/openssh" |
81 |
|
82 |
S="${WORKDIR}/${PN}" |
83 |
|
84 |
GAMESS_DOWNLOAD="http://www.msg.ameslab.gov/GAMESS/License_Agreement.html" |
85 |
GAMESS_VERSION="12 JAN 2009 (R3)" |
86 |
FORTRAN="ifc g77 gfortran" |
87 |
|
88 |
pkg_nofetch() { |
89 |
echo |
90 |
elog "Please download ${PN}-current.tar.gz from" |
91 |
elog "${GAMESS_DOWNLOAD}." |
92 |
elog "Be sure to select the version ${GAMESS_VERSION} tarball!!" |
93 |
elog "Then move the tarball to" |
94 |
elog "${DISTDIR}/${P}.tar.gz" |
95 |
if use qmmm-tinker ; then |
96 |
elog "Also download http://www.msg.ameslab.gov/GAMESS/tinker.tar.Z" |
97 |
elog "and place tinker.tar.Z to ${DISTDIR}" |
98 |
fi |
99 |
echo |
100 |
} |
101 |
|
102 |
pkg_setup() { |
103 |
fortran_pkg_setup |
104 |
|
105 |
# currently amd64 is only supported with gfortran |
106 |
if [[ "${ARCH}" == "amd64" ]] && [[ "${FORTRANC}" != "gfortran" ]]; |
107 |
then die "You will need gfortran to compile gamess on amd64" |
108 |
fi |
109 |
|
110 |
if use qmmm-tinker; then |
111 |
einfo "By default MM subsistem is restricted to 1000 atoms" |
112 |
einfo "if you want larger MM subsystems then you should set" |
113 |
einfo "QMMM_GAMESS_MAXMM variable to needed value in your make.conf" |
114 |
ebeep 5 |
115 |
fi |
116 |
} |
117 |
|
118 |
src_unpack() { |
119 |
unpack ${A} |
120 |
|
121 |
if use qmmm-tinker; then |
122 |
mv tinker gamess/ || die "failed to move tinker directory" |
123 |
fi |
124 |
} |
125 |
|
126 |
src_prepare() { |
127 |
# apply LINUX-arch patches to gamess makesfiles |
128 |
epatch "${FILESDIR}"/${PN}-20090112.1.gentoo.patch |
129 |
# select arch |
130 |
# NOTE: please leave lked alone; it should be good as is!! |
131 |
cd "${S}" |
132 |
local active_arch; |
133 |
if [[ "${ARCH}" == "amd64" ]]; then |
134 |
active_arch="linux64"; |
135 |
else |
136 |
active_arch="linux32"; |
137 |
fi |
138 |
sed -e "s:gentoo-target:${active_arch}:" \ |
139 |
-i comp compall ddi/compddi \ |
140 |
|| die "Failed to select proper architecure" |
141 |
|
142 |
# for hardened-gcc let't turn off ssp, since it breakes |
143 |
# a few routines |
144 |
if use hardened && [[ "${FORTRANC}" = "g77" ]]; then |
145 |
FFLAGS="${FFLAGS} -fno-stack-protector-all" |
146 |
fi |
147 |
|
148 |
# Enable mpi stuff |
149 |
if use mpi; then |
150 |
sed -e "s:set COMM = sockets:set COMM = mpi:g" \ |
151 |
-i ddi/compddi || die "Enabling mpi build failed" |
152 |
sed -e "s:MPI_INCLUDE_PATH = ' ':MPI_INCLUDE_PATH = '-I/usr/include ':g" \ |
153 |
-i ddi/compddi || die "Enabling mpi build failed" |
154 |
sed -e "s:MSG_LIBRARIES='../ddi/libddi.a -lpthread':MSG_LIBRARIES='../ddi/libddi.a -lmpi -lpthread':g" \ |
155 |
-i lked || die "Enabling mpi build failed" |
156 |
fi |
157 |
|
158 |
# enable NEO |
159 |
sed -e "s:NEO=false:NEO=true:" -i compall lked || \ |
160 |
die "Failed to enable NEO code" |
161 |
# enable GAMESS-qmmm |
162 |
if use qmmm-tinker; then |
163 |
sed -e "s:TINKER=false:TINKER=true:" -i compall lked || \ |
164 |
die "Failed to enable TINKER code" |
165 |
if [ "x$QMMM_GAMESS_MAXMM" == "x" ]; then |
166 |
einfo "No QMMM_GAMESS_MAXMM set. Using default value = 1000" |
167 |
else |
168 |
einfo "Setting QMMM_GAMESS_MAXMM to $QMMM_GAMESS_MAXMM" |
169 |
sed -e "s:maxatm=1000:maxatm=$QMMM_GAMESS_MAXMM:g" \ |
170 |
-i tinker/sizes.i \ |
171 |
|| die "Setting QMMM_GAMESS_MAXMM failed" |
172 |
sed -e "s:MAXATM=1000:MAXATM=$QMMM_GAMESS_MAXMM:g" \ |
173 |
-i source/inputb.src \ |
174 |
|| die "Setting QMMM_GAMESS_MAXMM failed" |
175 |
fi |
176 |
fi |
177 |
# greate proper activate sourcefile |
178 |
cp "./tools/actvte.code" "./tools/actvte.f" || \ |
179 |
die "Failed to create actvte.f" |
180 |
sed -e "s/^\*UNX/ /" -i "./tools/actvte.f" || \ |
181 |
die "Failed to perform UNX substitutions in actvte.f" |
182 |
|
183 |
# fix GAMESS' compall script to use proper CC |
184 |
sed -e "s|\$CCOMP -c \$extraflags source/zunix.c|$(tc-getCC) -c \$extraflags source/zunix.c|" \ |
185 |
-i compall || die "Failed setting up compall script" |
186 |
|
187 |
# insert proper FFLAGS into GAMESS' comp makefile |
188 |
# in case we're using ifc let's strip all the gcc |
189 |
# specific stuff |
190 |
if [[ "${FORTRANC}" == "ifc" ]]; then |
191 |
sed -e "s/gentoo-OPT = '-O2'/OPT = '${FFLAGS} -quiet'/" \ |
192 |
-e "s/gentoo-g77/${FORTRANC}/" \ |
193 |
-i comp || die "Failed setting up comp script" |
194 |
elif ! use x86; then |
195 |
sed -e "s/-malign-double //" \ |
196 |
-e "s/gentoo-OPT = '-O2'/OPT = '${FFLAGS}'/" \ |
197 |
-e "s/gentoo-g77/${FORTRANC}/" \ |
198 |
-i comp || die "Failed setting up comp script" |
199 |
else |
200 |
sed -e "s/gentoo-OPT = '-O2'/OPT = '${FFLAGS}'/" \ |
201 |
-e "s/gentoo-g77/${FORTRANC}/" \ |
202 |
-i comp || die "Failed setting up comp script" |
203 |
fi |
204 |
|
205 |
# fix up GAMESS' linker script; |
206 |
sed -e "s/gentoo-g77/${FORTRANC}/" \ |
207 |
-e "s/gentoo-LDOPTS=' '/LDOPTS='${LDFLAGS}'/" \ |
208 |
-i lked || die "Failed setting up lked script" |
209 |
|
210 |
# fix up GAMESS' ddi TCP/IP socket build |
211 |
sed -e "s/gentoo-CC = 'gcc'/CC = '$(tc-getCC)'/" \ |
212 |
-e "s/gentoo-g77/${FORTRANC}/" \ |
213 |
-i ddi/compddi || die "Failed setting up compddi script" |
214 |
|
215 |
# fix up the checker scripts for gamess tests |
216 |
sed -e "s:set GMSPATH:#set GMSPATH:g" \ |
217 |
-e "s:\$GMSPATH/tools/checktst:.:g" \ |
218 |
-i tools/checktst/checktst |
219 |
} |
220 |
|
221 |
src_compile() { |
222 |
# build actvte |
223 |
cd "${S}"/tools |
224 |
"${FORTRANC}" -o actvte.x actvte.f || \ |
225 |
die "Failed to compile actvte.x" |
226 |
|
227 |
# for hardened (PAX) users and ifc we need to turn |
228 |
# MPROTECT off |
229 |
if [[ "${FORTRANC}" == "ifc" ]] && use hardened; then |
230 |
/sbin/paxctl -PemRxS actvte.x 2> /dev/null || \ |
231 |
die "paxctl failed on actvte.x" |
232 |
fi |
233 |
|
234 |
# build gamess |
235 |
cd "${S}" |
236 |
./compall || die "compall failed" |
237 |
|
238 |
# build the ddi TCP/IP socket stuff |
239 |
cd ${S}/"ddi" |
240 |
./compddi || die "compddi failed" |
241 |
|
242 |
# finally, link it all together |
243 |
cd "${S}" |
244 |
./lked || die "lked failed" |
245 |
|
246 |
# for hardened (PAX) users and ifc we need to turn |
247 |
# MPROTECT off |
248 |
if [[ "${FORTRANC}" == "ifc" ]] && use hardened; then |
249 |
/sbin/paxctl -PemRxS ${PN}.00.x 2> /dev/null || \ |
250 |
die "paxctl failed on actvte.x" |
251 |
fi |
252 |
} |
253 |
|
254 |
src_install() { |
255 |
# the executables |
256 |
dobin ${PN}.00.x rungms \ |
257 |
|| die "Failed installing binaries" |
258 |
if !use mpi; then |
259 |
dobin ddi/ddikick.x \ |
260 |
|| die "Failed installing binaries" |
261 |
fi |
262 |
|
263 |
# the docs |
264 |
dodoc *.DOC qmnuc/*.DOC || die "Failed installing docs" |
265 |
|
266 |
# install ericftm |
267 |
insinto /usr/share/${PN}/ericfmt |
268 |
doins ericfmt.dat || die "Failed installing ericfmt.dat" |
269 |
|
270 |
# install mcpdata |
271 |
insinto /usr/share/${PN}/mcpdata |
272 |
doins mcpdata/* || die "Failed installing mcpdata" |
273 |
|
274 |
# install tinker params in case of qmmm |
275 |
if use qmmm-tinker ; then |
276 |
dodoc tinker/simomm.doc || die "Failed installing docs" |
277 |
insinto /usr/share/${PN} |
278 |
doins -r tinker/params || die "Failed to install Tinker params" |
279 |
fi |
280 |
|
281 |
# install the tests the user should run, and |
282 |
# fix up the runscript; also grab a copy of rungms |
283 |
# so the user is ready to run the tests |
284 |
insinto /usr/share/${PN}/tests |
285 |
insopts -m0644 |
286 |
doins tests/* || die "Failed installing tests" |
287 |
insopts -m0744 |
288 |
doins runall || die "Failed installing tests" |
289 |
doins tools/checktst/checktst tools/checktst/chkabs || \ |
290 |
die "Failed to install main test checker" |
291 |
doins tools/checktst/exam* || \ |
292 |
die "Failed to install individual test files" |
293 |
|
294 |
insinto /usr/share/${PN}/neotests |
295 |
insopts -m0644 |
296 |
doins -r qmnuc/neotests/* || die "Failed to install NEO tests" |
297 |
} |
298 |
|
299 |
pkg_postinst() { |
300 |
echo |
301 |
einfo "Before you use GAMESS for any serious work you HAVE" |
302 |
einfo "to run the supplied test files located in" |
303 |
einfo "/usr/share/gamess/tests and check them thoroughly." |
304 |
einfo "Otherwise all scientific publications resulting from" |
305 |
einfo "your GAMESS runs should be immediately rejected :)" |
306 |
einfo "To do so copy the content of /usr/share/gamess/tests" |
307 |
einfo "to some temporary location and execute './runall'. " |
308 |
einfo "Then run the checktst script in the same directory to" |
309 |
einfo "validate the tests." |
310 |
einfo "Please consult TEST.DOC and the other docs!" |
311 |
|
312 |
if [[ "${FORTRANC}" == "ifc" ]]; then |
313 |
echo |
314 |
ewarn "IMPORTANT NOTE: We STRONGLY recommend to stay away" |
315 |
ewarn "from ifc-9.0 for now and use the ifc-8.1 series of" |
316 |
ewarn "compilers UNLESS you can run through ALL of the " |
317 |
ewarn "test cases (see above) successfully." |
318 |
fi |
319 |
|
320 |
echo |
321 |
einfo "If you want to run on more than a single CPU" |
322 |
einfo "you will have to acquaint yourself with the way GAMESS" |
323 |
einfo "does multiprocessor runs and adjust rungms according to" |
324 |
einfo "your target network architecture." |
325 |
echo |
326 |
} |