1 |
alexxy 10/05/30 07:00:01 |
2 |
|
3 |
Added: gamess-20100325.2.gentoo.patch |
4 |
Log: |
5 |
[sci-chemistry/gamess] make it build with new buildsystem |
6 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 sci-chemistry/gamess/files/gamess-20100325.2.gentoo.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gamess/files/gamess-20100325.2.gentoo.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gamess/files/gamess-20100325.2.gentoo.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: gamess-20100325.2.gentoo.patch |
15 |
=================================================================== |
16 |
diff -urN gamess.orig/comp gamess/comp |
17 |
--- gamess.orig/comp 2010-05-04 22:11:54.000000000 +0400 |
18 |
+++ gamess/comp 2010-05-30 03:46:52.000000000 +0400 |
19 |
@@ -1336,7 +1336,7 @@ |
20 |
# g77 does not support FORTRAN logical units above 99, or 128 bit math. |
21 |
# |
22 |
case g77: |
23 |
- set OPT = '-O2' |
24 |
+ set gentoo-OPT = '-O2' |
25 |
if ($MODULE == ormas1) set OPT='-O2 -fno-move-all-movables' # RH9, g77 3.3 |
26 |
if ($MODULE == zheev) set OPT='-O0' # defensive compiling |
27 |
if (($MODULE == qeigen) || ($MODULE == int2c)) then |
28 |
@@ -1366,7 +1366,7 @@ |
29 |
# -std=legacy suppresses warnings about use of f77 constructs. |
30 |
# |
31 |
case gfortran: |
32 |
- set OPT='-O2' |
33 |
+ set gentoo-OPT = '-O2' |
34 |
if ($MODULE == zheev) set OPT='-O0' # defensive compiling |
35 |
if ($MODULE == pcmcv2) set OPT='-O1' # EFP+CPCM, ala Francois, v4.1.2 |
36 |
if (($MODULE == qeigen) || ($MODULE == int2c)) then |
37 |
@@ -1392,7 +1392,7 @@ |
38 |
# optimizations in 32 bit mode, as a function of the ifort version. |
39 |
# |
40 |
case ifort: |
41 |
- set OPT = '-O3' |
42 |
+ set gentoo-OPT = '-O2' |
43 |
if ($MODULE == delocl) set OPT='-O0' # from Cheol |
44 |
if ($MODULE == zheev) set OPT='-O0' |
45 |
set echo |
46 |
@@ -1504,7 +1504,7 @@ |
47 |
|
48 |
case gfortran: |
49 |
# -finit-real=<zero|inf|-inf|nan> could be interesting debug opt |
50 |
- set OPT='-O2' |
51 |
+ set gentoo-OPT = '-O2' |
52 |
if ($MODULE == zheev) set OPT='-O0' # defensive compiling |
53 |
if (($MODULE == qeigen) || ($MODULE == int2c)) then |
54 |
mv -f $MODULE.f $MODULE.junk |
55 |
@@ -1533,7 +1533,7 @@ |
56 |
# -WB means warn but don't fail on out-of-bounds array references |
57 |
# -ftz flushes underflow results to zero |
58 |
# |
59 |
- set OPT = '-O2' |
60 |
+ set gentoo-OPT = '-O2' |
61 |
if ($MODULE == guess) set OPT='-O0' # 10.0, exam39 |
62 |
if ($MODULE == locpol) set OPT='-O1' # 10.0, makefp/gmres |
63 |
if ($MODULE == morokm) set OPT='-O0' # Jan Fredin |
64 |
diff -urN gamess.orig/compall gamess/compall |
65 |
--- gamess.orig/compall 2010-05-11 23:22:04.000000000 +0400 |
66 |
+++ gamess/compall 2010-05-30 03:46:16.000000000 +0400 |
67 |
@@ -84,15 +84,14 @@ |
68 |
endif |
69 |
endif |
70 |
if ($TARGET == linux32) set extraflags='-DLINUX32' |
71 |
-if ($TARGET == linux64) then |
72 |
+if ($TARGET == linux64) then |
73 |
+ set chip=`uname -m` |
74 |
# Ubuntu uses the non-standard -m flag, its -p replies "unknown" |
75 |
- set chip=`uname -p` |
76 |
- if ($chip == unknown) set chip=`uname -m` |
77 |
- if ($chip == x86_64) set extraflags='-DLINUX64 -m64' |
78 |
- if ($chip == ia64) set extraflags='-DLINUX64' # this always 64 bits |
79 |
+ if ($chip == x86_64) set extraflags='-DLINUX64 -m64' |
80 |
+ if ($chip == ia64) set extraflags='-DLINUX64' # this always 64 bits |
81 |
endif |
82 |
if ($TARGET == mac32) set extraflags='-DLINUX32' |
83 |
-if ($TARGET == mac64) set extraflags='-DLINUX64 -m64 -I/usr/include/malloc' |
84 |
+if ($TARGET == mac64) set extraflags='-DLINUX64 -m64 -I/usr/include/malloc' |
85 |
if ($TARGET == necsx) set extraflags='-DNECSX -size_t64' |
86 |
if ($TARGET == sgi32) set extraflags='-DSGI32 -n32' |
87 |
if ($TARGET == sgi64) set extraflags='-DSGI64 -64' |
88 |
diff -urN gamess.orig/ddi/compddi gamess/ddi/compddi |
89 |
--- gamess.orig/ddi/compddi 2010-05-10 17:34:25.000000000 +0400 |
90 |
+++ gamess/ddi/compddi 2010-05-30 03:46:16.000000000 +0400 |
91 |
@@ -640,7 +640,7 @@ |
92 |
|
93 |
set FORTRAN=$GMS_FORTRAN # might be g77, gfortran, ifort, pgf77, f2c |
94 |
|
95 |
- set CC = 'gcc' |
96 |
+ set gentoo-CC = 'gcc' |
97 |
set CFLAGS = "-DLINUX -O3 -fstrict-aliasing -I./" |
98 |
set CLIBS = "-lpthread" |
99 |
|
100 |
@@ -693,7 +693,7 @@ |
101 |
set ARCH='-m64' |
102 |
if (`uname -p` == ia64) set ARCH='' |
103 |
|
104 |
- set CC = 'gcc' |
105 |
+ set gentoo-CC = 'gcc' |
106 |
set CFLAGS = "-DLINUX $ARCH -O3 -fstrict-aliasing -I./" |
107 |
set CLIBS = "-lpthread" |
108 |
|
109 |
diff -urN gamess.orig/ddi/kickoff/ddikick.c gamess/ddi/kickoff/ddikick.c |
110 |
--- gamess.orig/ddi/kickoff/ddikick.c 2008-05-06 14:16:12.000000000 +0400 |
111 |
+++ gamess/ddi/kickoff/ddikick.c 2010-05-30 03:46:16.000000000 +0400 |
112 |
@@ -105,7 +105,7 @@ |
113 |
remoteshell = argv[++i]; |
114 |
} else { |
115 |
if((remoteshell = getenv("DDI_RSH")) == NULL) { |
116 |
- remoteshell = (char *) strdup("rsh"); |
117 |
+ remoteshell = (char *) strdup("ssh"); |
118 |
} |
119 |
} |
120 |
|
121 |
diff -urN gamess.orig/lked gamess/lked |
122 |
--- gamess.orig/lked 2010-05-06 22:00:32.000000000 +0400 |
123 |
+++ gamess/lked 2010-05-30 03:46:16.000000000 +0400 |
124 |
@@ -61,7 +61,7 @@ |
125 |
# |
126 |
# optional Nuclear-Electronic Orbital method, using NEO code |
127 |
# neostb.o is dummy substitute from the standard GAMESS distribution. |
128 |
-set NEO=false |
129 |
+set NEO=true |
130 |
if ($NEO == true) then |
131 |
set NEOOBJ="neo.o neobas.o neocas.o neoden.o neofci.o" |
132 |
set NEOOBJ="$NEOOBJ neog2a.o neog2b.o neog2c.o neogrd.o" |
133 |
@@ -372,17 +372,17 @@ |
134 |
switch ($GMS_FORTRAN) |
135 |
case g77: |
136 |
set LDR='g77' |
137 |
- set LDOPTS=' ' # add '-Wl,-M' to see load map |
138 |
+ set gentoo-LDOPTS=' ' # add '-Wl,-M' to see load map |
139 |
set FORTLIBS=' ' |
140 |
breaksw |
141 |
case gfortran: |
142 |
set LDR='gfortran' |
143 |
- set LDOPTS=' ' |
144 |
+ set gentoo-LDOPTS=' ' |
145 |
set FORTLIBS=' ' |
146 |
breaksw |
147 |
case ifort: |
148 |
set LDR='ifort' |
149 |
- set LDOPTS=' ' # add '-Wl,-M' to see load map |
150 |
+ set gentoo-LDOPTS=' ' # add '-Wl,-M' to see load map |
151 |
set FORTLIBS='-Vaxlib' |
152 |
breaksw |
153 |
case pgf77: |
154 |
@@ -392,7 +392,7 @@ |
155 |
breaksw |
156 |
case f2c: |
157 |
set LDR='gcc' |
158 |
- set LDOPTS=' ' |
159 |
+ set gentoo-LDOPTS=' ' |
160 |
set FORTLIBS='-lf2c -lm' |
161 |
breaksw |
162 |
default: |
163 |
@@ -441,12 +441,7 @@ |
164 |
# If the ATLAS comes with static libraries, link to them |
165 |
# so that only the compile node has to have the libraries. |
166 |
# Otherwise, attempt a link against shared object libs. |
167 |
- if (-e $GMS_MATHLIB_PATH/libf77blas.a) then |
168 |
- set MATHLIBS="$GMS_MATHLIB_PATH/libf77blas.a" |
169 |
- set MATHLIBS="$MATHLIBS $GMS_MATHLIB_PATH/libatlas.a" |
170 |
- else |
171 |
- set MATHLIBS="-L$GMS_MATHLIB_PATH -lf77blas -latlas" |
172 |
- endif |
173 |
+ set MATHLIBS=`pkg-config --libs blas` |
174 |
set BLAS=' ' |
175 |
breaksw |
176 |
|
177 |
@@ -480,12 +475,12 @@ |
178 |
switch ($GMS_FORTRAN) |
179 |
case gfortran: |
180 |
set LDR='gfortran' |
181 |
- set LDOPTS=' ' |
182 |
+ set gentoo-LDOPTS=' ' |
183 |
set FORTLIBS=' ' |
184 |
breaksw |
185 |
case ifort: |
186 |
set LDR='ifort' |
187 |
- set LDOPTS='-i8' # -Wl,-M generates a load map |
188 |
+ set gentoo-LDOPTS=' ' # -Wl,-M generates a load map |
189 |
# this auxiliary library seems to have disappeared in ifort 10 |
190 |
set FORTLIBS=' ' |
191 |
if($GMS_IFORT_VERNO < 10) set FORTLIBS='-Vaxlib' |
192 |
@@ -551,12 +546,7 @@ |
193 |
# If the ATLAS comes with static libraries, link to them |
194 |
# so that only the compile node has to have the libraries. |
195 |
# Otherwise, attempt a link against shared object libs. |
196 |
- if (-e $GMS_MATHLIB_PATH/libf77blas.a) then |
197 |
- set MATHLIBS="$GMS_MATHLIB_PATH/libf77blas.a" |
198 |
- set MATHLIBS="$MATHLIBS $GMS_MATHLIB_PATH/libatlas.a" |
199 |
- else |
200 |
- set MATHLIBS="-L$GMS_MATHLIB_PATH -lf77blas -latlas" |
201 |
- endif |
202 |
+ set MATHLIBS=`pkg-config --libs blas` |
203 |
set BLAS=' ' |
204 |
breaksw |
205 |
|
206 |
diff -urN gamess.orig/runall gamess/runall |
207 |
--- gamess.orig/runall 2009-02-28 02:57:18.000000000 +0300 |
208 |
+++ gamess/runall 2010-05-30 03:46:16.000000000 +0400 |
209 |
@@ -10,7 +10,6 @@ |
210 |
# |
211 |
# Only the following two lines need to be customized: |
212 |
# |
213 |
-chdir /u1/mike/gamess |
214 |
set VERNO=00 |
215 |
# |
216 |
# Loop over all Ntest jobs supplied with GAMESS |
217 |
@@ -27,7 +26,7 @@ |
218 |
gms -v $VERNO -q ti -l exam$NUM.log exam$NUM |
219 |
sleep 5 |
220 |
else |
221 |
- ./rungms exam$NUM $VERNO 1 >& exam$NUM.log |
222 |
+ rungms exam$NUM $VERNO 1 >& exam$NUM.log |
223 |
endif |
224 |
@ i++ |
225 |
end |
226 |
diff -urN gamess.orig/rungms gamess/rungms |
227 |
--- gamess.orig/rungms 2010-05-06 23:08:56.000000000 +0400 |
228 |
+++ gamess/rungms 2010-05-30 03:46:16.000000000 +0400 |
229 |
@@ -55,7 +55,7 @@ |
230 |
# one for LoadLeveler "ll-gms" on the IBM SP line. |
231 |
# |
232 |
set TARGET=sockets |
233 |
-set SCR=/scr/$USER |
234 |
+set SCR=`pwd` |
235 |
# |
236 |
set JOB=$1 # name of the input file xxx.inp, give only the xxx part |
237 |
set VERNO=$2 # revision number of the executable created by 'lked' step |
238 |
@@ -122,17 +122,17 @@ |
239 |
# |
240 |
set echo |
241 |
# ASCII input files (see explanation above) |
242 |
-setenv ERICFMT ~mike/gamess/ericfmt.dat |
243 |
-setenv MCPPATH ~mike/gamess/mcpdata |
244 |
+setenv ERICFMT /usr/share/gamess/ericfmt/ericfmt.dat |
245 |
+setenv MCPPATH /usr/share/gamess/mcpdata |
246 |
setenv EXTBAS /dev/null |
247 |
setenv NUCBAS /dev/null |
248 |
# |
249 |
-setenv MAKEFP ~$USER/scr/$JOB.efp |
250 |
-setenv GAMMA ~$USER/scr/$JOB.gamma |
251 |
-setenv TRAJECT ~$USER/scr/$JOB.trj |
252 |
-setenv RESTART ~$USER/scr/$JOB.rst |
253 |
+setenv MAKEFP $SCR/$JOB.efp |
254 |
+setenv GAMMA $SCR/$JOB.gamma |
255 |
+setenv TRAJECT $SCR/$JOB.trj |
256 |
+setenv RESTART $SCR/$JOB.rst |
257 |
setenv INPUT $SCR/$JOB.F05 |
258 |
-setenv PUNCH ~$USER/scr/$JOB.dat |
259 |
+setenv PUNCH $SCR/$JOB.dat |
260 |
setenv AOINTS $SCR/$JOB.F08 |
261 |
setenv MOINTS $SCR/$JOB.F09 |
262 |
setenv DICTNRY $SCR/$JOB.F10 |
263 |
@@ -311,7 +311,7 @@ |
264 |
if (null$4 == null) set ELGNAME=ELGFILE |
265 |
set echo |
266 |
setenv AOINTS $SCR/$ELGNAME.F08 |
267 |
- setenv ELGDOS ~$USER/scr/$JOB.ldos |
268 |
+ setenv ELGDOS $SCR/$JOB.ldos |
269 |
setenv ELGDAT $SCR/$ELGNAME.F71 |
270 |
setenv ELGPAR $SCR/$ELGNAME.F72 |
271 |
setenv ELGCUT $SCR/$ELGNAME.F74 |
272 |
@@ -439,7 +439,7 @@ |
273 |
if ($os == AIX) set GMSPATH=/u1/mike/gamess |
274 |
if ($os == Darwin) set GMSPATH=/Users/mike/desktop/gamess |
275 |
if ($os == HP-UX) set GMSPATH=/zr/mike/gamess |
276 |
- if ($os == Linux) set GMSPATH=/cu/mike/gamess |
277 |
+ if ($os == Linux) set GMSPATH=/usr/bin |
278 |
if ($os == OSF1) set GMSPATH=/in/mike/gamess |
279 |
if ($os == SunOS) set GMSPATH=/hf/mike/gamess |
280 |
# special compilation for Sun E450 uSPARC (uname also= SunOS) |
281 |
@@ -485,67 +485,6 @@ |
282 |
set NNODES=1 |
283 |
set HOSTLIST=(`hostname`) |
284 |
endif |
285 |
-# |
286 |
-# 2. This is an example of how to run on a 4-way SMP enclosure, |
287 |
-# where all CPUs (aka COREs) are inside a -single- NODE. |
288 |
-# The example is repeated for some nodes we use as 2-way's. |
289 |
- if ($NCPUS > 1) then |
290 |
- switch (`hostname`) |
291 |
- case ti.msg.chem.iastate.edu: |
292 |
- case cd.msg.chem.iastate.edu: |
293 |
- case zn.msg.chem.iastate.edu: |
294 |
- case ni.msg.chem.iastate.edu: |
295 |
- case co.msg.chem.iastate.edu: |
296 |
- case pb.msg.chem.iastate.edu: |
297 |
- case bi.msg.chem.iastate.edu: |
298 |
- case po.msg.chem.iastate.edu: |
299 |
- case at.msg.chem.iastate.edu: |
300 |
- case sc.msg.chem.iastate.edu: |
301 |
- if ($NCPUS > 4) set NCPUS=4 |
302 |
- set NNODES=1 |
303 |
- set HOSTLIST=(`hostname`:cpus=$NCPUS) |
304 |
- breaksw |
305 |
- case se.msg.chem.iastate.edu: |
306 |
- case sb.msg.chem.iastate.edu: |
307 |
- case br.msg.chem.iastate.edu: |
308 |
- if ($NCPUS > 2) set NCPUS=2 |
309 |
- set NNODES=1 |
310 |
- set HOSTLIST=(`hostname`:cpus=$NCPUS) |
311 |
- breaksw |
312 |
- default: |
313 |
- echo I do not know how to run this node in parallel. |
314 |
- exit 20 |
315 |
- endsw |
316 |
- endif |
317 |
-# |
318 |
-# 3. A phony example, of six uniprocessors (arbitrary names) |
319 |
-# Because they are uniprocessors, we just set NNODES = NCPUS. |
320 |
-# Since their names never change, we just can just specify them. |
321 |
-# Note that we can use a short name like 'bb' if and only if |
322 |
-# system name resolution can map them onto the true host names. |
323 |
- if (`hostname` == aa.msg.chem.iastate.edu) then |
324 |
- set NNODES=$NCPUS |
325 |
- set HOSTLIST=(aa bb cc dd ee ff) |
326 |
- endif |
327 |
-# |
328 |
-# 4. An example of 16 uniprocessor boxes in a Beowulf-type cluster. |
329 |
-# Because they are uniprocessors, we just set NNODES = NCPUS. |
330 |
-# Their host names fall into the pattern fly1 to fly16, |
331 |
-# which we can turn into a HOSTLIST with a small loop. |
332 |
- if (`hostname` == fly1.fi.ameslab.gov) then |
333 |
- set NNODES=$NCPUS |
334 |
- set HOSTLIST=() |
335 |
- set nmax=$NCPUS |
336 |
- if ($nmax > 16) set nmax=16 |
337 |
- @ CPU=1 |
338 |
- while ($CPU <= $nmax) |
339 |
- set HOSTLIST=($HOSTLIST fly$CPU) |
340 |
- @ CPU++ |
341 |
- end |
342 |
- unset $CPU |
343 |
- endif |
344 |
-# |
345 |
-# 5. Scalable Computing Lab's clusters running PBS batch queues. |
346 |
# Here the task is to manipulate the dynamically assigned host |
347 |
# names into the HOSTLIST string for the kickoff program, |
348 |
# and to request the host name of the fast network adapters. |
349 |
@@ -554,8 +493,6 @@ |
350 |
# |
351 |
# The IBM cluster has two Gigabit adapters in each 4-way SMP, |
352 |
# while the AXP cluster is based on a Myrinet network. |
353 |
- if (`uname` == AIX) set NETEXT=".gig,.gig2" |
354 |
- if (`uname` == Linux) set NETEXT=".myri" |
355 |
# |
356 |
# repeated host names in the PBS host file indicate being assigned |
357 |
# CPUs in the same SMP enclosure, which we must count up correctly. |
358 |
@@ -586,12 +523,11 @@ |
359 |
@ NNODES = 1 |
360 |
@ NSMPCPU = 1 |
361 |
set spacer1=":cpus=" |
362 |
- set spacer2=":netext=" |
363 |
while($IPROC <= $nmax) |
364 |
set MYPROC=`sed -n -e "$IPROC p" $PBS_NODEFILE` |
365 |
set MYPROC=`echo $MYPROC | awk '{split($0,a,"."); print a[1]}'` |
366 |
if($MYPROC != $MYNODE) then |
367 |
- set HOSTLIST = ($HOSTLIST $MYNODE$spacer1$NSMPCPU$spacer2$NETEXT) |
368 |
+ set HOSTLIST = ($HOSTLIST $MYNODE$spacer1$NSMPCPU) |
369 |
set MYNODE=$MYPROC |
370 |
@ NSMPCPU = 0 |
371 |
@ NNODES++ |
372 |
@@ -599,13 +535,13 @@ |
373 |
@ IPROC++ |
374 |
@ NSMPCPU++ |
375 |
end |
376 |
- set HOSTLIST = ($HOSTLIST $MYNODE$spacer1$NSMPCPU$spacer2$NETEXT) |
377 |
+ set HOSTLIST = ($HOSTLIST $MYNODE$spacer1$NSMPCPU) |
378 |
endif |
379 |
# |
380 |
# we have now finished setting up a correct HOSTLIST. |
381 |
# uncomment the next two if you are doing script debugging. |
382 |
-#--echo "The generated host list is" |
383 |
-#--echo $HOSTLIST |
384 |
+ echo "The generated host list is" |
385 |
+ echo $HOSTLIST |
386 |
# |
387 |
|
388 |
# |
389 |
diff -urN gamess.orig/tools/checktst/checktst gamess/tools/checktst/checktst |
390 |
--- gamess.orig/tools/checktst/checktst 2008-12-30 18:33:09.000000000 +0300 |
391 |
+++ gamess/tools/checktst/checktst 2010-05-30 03:46:16.000000000 +0400 |
392 |
@@ -3,11 +3,6 @@ |
393 |
# Compare the results of GAMESS sample jobs to pre-stored correct values. |
394 |
# This script can be executed from any directory with write permissions. |
395 |
# Written by D. G. Fedorov, AIST, July 20, 2004. |
396 |
-# |
397 |
-# Only the path name in the very next line needs to be customized. |
398 |
-# |
399 |
-set GMSPATH=~/gamess |
400 |
- |
401 |
# The Ntest outputs are assumed to be named exam01.log, exam02.log, ... |
402 |
# but the user will be allowed to specify the directory containing them. |
403 |
# |