gamess-20110811.1.gentoo.patch 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. diff -urN gamess.orig/comp gamess/comp
  2. --- gamess.orig/comp 2011-08-11 17:37:48.000000000 +0200
  3. +++ gamess/comp 2011-10-11 15:17:23.349829478 +0200
  4. @@ -1444,7 +1444,7 @@
  5. # g77 does not support FORTRAN logical units above 99, or 128 bit math.
  6. #
  7. case g77:
  8. - set OPT = '-O2'
  9. + set gentoo-OPT = '-O2'
  10. if ($MODULE == ormas1) set OPT='-O2 -fno-move-all-movables' # RH9, g77 3.3
  11. if ($MODULE == zheev) set OPT='-O0' # defensive compiling
  12. if (($MODULE == qeigen) || ($MODULE == int2c)) then
  13. @@ -1474,7 +1474,7 @@
  14. # -std=legacy suppresses warnings about use of f77 constructs.
  15. #
  16. case gfortran:
  17. - set OPT='-O2'
  18. + set gentoo-OPT = '-O2'
  19. if ($MODULE == zheev) set OPT='-O0' # defensive compiling
  20. if ($MODULE == pcmcv2) set OPT='-O1' # EFP+CPCM, ala Francois, v4.1.2
  21. if (($MODULE == qeigen) || ($MODULE == int2c)) then
  22. @@ -1500,7 +1500,7 @@
  23. # optimizations in 32 bit mode, as a function of the ifort version.
  24. #
  25. case ifort:
  26. - set OPT = '-O3'
  27. + set gentoo-OPT = '-O2'
  28. if ($MODULE == delocl) set OPT='-O0' # from Cheol
  29. if ($MODULE == prpamm) set OPT='-O0' # for exam13
  30. if ($MODULE == zheev) set OPT='-O0'
  31. @@ -1617,7 +1617,7 @@
  32. case gfortran:
  33. # -finit-real=<zero|inf|-inf|nan> could be interesting debug opt
  34. # -fno-automatic forces static storage of all local variables
  35. - set OPT='-O2'
  36. + set gentoo-OPT = '-O2'
  37. if (".$GMS_DEBUG_FLAGS" != .) set OPT="$GMS_DEBUG_FLAGS"
  38. if ($MODULE == zheev) set OPT='-O0' # defensive compiling
  39. if (($MODULE == qeigen) || ($MODULE == int2c)) then
  40. @@ -1648,7 +1648,7 @@
  41. # -WB means warn but don't fail on out-of-bounds array references
  42. # -ftz flushes underflow results to zero
  43. #
  44. - set OPT = '-O2'
  45. + set gentoo-OPT = '-O2'
  46. if (".$GMS_DEBUG_FLAGS" != .) set OPT="$GMS_DEBUG_FLAGS"
  47. # alas, I'm so tired of hearing about so many versions failing to
  48. # diagonalize, that this time critical code is run w/o optimization.
  49. diff -urN gamess.orig/compall gamess/compall
  50. --- gamess.orig/compall 2011-05-17 22:53:33.000000000 +0200
  51. +++ gamess/compall 2011-10-11 12:13:30.041087251 +0200
  52. @@ -84,12 +84,11 @@
  53. endif
  54. endif
  55. if ($TARGET == linux32) set extraflags='-DLINUX32'
  56. -if ($TARGET == linux64) then
  57. +if ($TARGET == linux64) then
  58. + set chip=`uname -m`
  59. # Ubuntu uses the non-standard -m flag, its -p replies "unknown"
  60. - set chip=`uname -p`
  61. - if ($chip == unknown) set chip=`uname -m`
  62. - if ($chip == x86_64) set extraflags='-DLINUX64 -m64'
  63. - if ($chip == ia64) set extraflags='-DLINUX64' # this always 64 bits
  64. + if ($chip == x86_64) set extraflags='-DLINUX64 -m64'
  65. + if ($chip == ia64) set extraflags='-DLINUX64' # this always 64 bits
  66. endif
  67. if ($TARGET == mac32) set extraflags='-DLINUX32'
  68. if ($TARGET == mac64) set extraflags='-DLINUX64 -m64 -I/usr/include/malloc'
  69. diff -urN gamess.orig/ddi/compddi gamess/ddi/compddi
  70. --- gamess.orig/ddi/compddi 2011-02-15 21:31:30.000000000 +0100
  71. +++ gamess/ddi/compddi 2011-10-11 12:23:45.513796580 +0200
  72. @@ -634,7 +634,7 @@
  73. set FORTRAN=$GMS_FORTRAN # might be g77, gfortran, ifort, pgf77, f2c
  74. - set CC = 'gcc'
  75. + set gentoo-CC = 'gcc'
  76. set CFLAGS = "-DLINUX -O3 -fstrict-aliasing -I./"
  77. set CLIBS = "-lpthread"
  78. @@ -687,7 +687,7 @@
  79. set ARCH='-m64'
  80. if (`uname -p` == ia64) set ARCH=''
  81. - set CC = 'gcc'
  82. + set gentoo-CC = 'gcc'
  83. set CFLAGS = "-DLINUX $ARCH -O3 -fstrict-aliasing -I./"
  84. set CLIBS = "-lpthread"
  85. diff -urN gamess.orig/ddi/kickoff/ddikick.c gamess/ddi/kickoff/ddikick.c
  86. --- gamess.orig/ddi/kickoff/ddikick.c 2008-05-06 12:16:12.000000000 +0200
  87. +++ gamess/ddi/kickoff/ddikick.c 2011-10-11 12:25:11.862714681 +0200
  88. @@ -105,7 +105,7 @@
  89. remoteshell = argv[++i];
  90. } else {
  91. if((remoteshell = getenv("DDI_RSH")) == NULL) {
  92. - remoteshell = (char *) strdup("rsh");
  93. + remoteshell = (char *) strdup("ssh");
  94. }
  95. }
  96. diff -urN gamess.orig/lked gamess/lked
  97. --- gamess.orig/lked 2011-08-11 17:41:02.000000000 +0200
  98. +++ gamess/lked 2011-10-11 12:26:38.564634821 +0200
  99. @@ -53,7 +53,7 @@
  100. #
  101. # 3. optional Nuclear-Electronic Orbital method, using NEO code
  102. #
  103. -set NEO=false
  104. +set NEO=true
  105. #
  106. # 4. optional Nvidia/CUDA code, for closed shell SCF Fock construction
  107. # see ~/gamess/libcchem/aaa.readme.1st for more information
  108. @@ -356,17 +356,17 @@
  109. switch ($GMS_FORTRAN)
  110. case g77:
  111. set LDR='g77'
  112. - set LDOPTS=' ' # add '-Wl,-M' to see load map
  113. + set gentoo-LDOPTS=' ' # add '-Wl,-M' to see load map
  114. set FORTLIBS=' '
  115. breaksw
  116. case gfortran:
  117. set LDR='gfortran'
  118. - set LDOPTS=' '
  119. + set gentoo-LDOPTS=' '
  120. set FORTLIBS=' '
  121. breaksw
  122. case ifort:
  123. set LDR='ifort'
  124. - set LDOPTS=' ' # add '-Wl,-M' to see load map
  125. + set gentoo-LDOPTS=' ' # add '-Wl,-M' to see load map
  126. set FORTLIBS='-Vaxlib'
  127. breaksw
  128. case pgf77:
  129. @@ -376,7 +376,7 @@
  130. breaksw
  131. case f2c:
  132. set LDR='gcc'
  133. - set LDOPTS=' '
  134. + set gentoo-LDOPTS=' '
  135. set FORTLIBS='-lf2c -lm'
  136. breaksw
  137. default:
  138. @@ -427,12 +427,7 @@
  139. # Otherwise, attempt a link against shared object libs.
  140. # See the 64 bit Atlas below for a way to fix the linker's
  141. # not being able to locate -lf77blas, if that happens.
  142. - if (-e $GMS_MATHLIB_PATH/libf77blas.a) then
  143. - set MATHLIBS="$GMS_MATHLIB_PATH/libf77blas.a"
  144. - set MATHLIBS="$MATHLIBS $GMS_MATHLIB_PATH/libatlas.a"
  145. - else
  146. - set MATHLIBS="-L$GMS_MATHLIB_PATH -lf77blas -latlas"
  147. - endif
  148. + set MATHLIBS=`${PKG_CONFIG} --libs blas`
  149. set BLAS=' '
  150. breaksw
  151. @@ -466,12 +461,12 @@
  152. switch ($GMS_FORTRAN)
  153. case gfortran:
  154. set LDR='gfortran'
  155. - set LDOPTS=' '
  156. + set gentoo-LDOPTS=' '
  157. set FORTLIBS=' '
  158. breaksw
  159. case ifort:
  160. set LDR='ifort'
  161. - set LDOPTS='-i8' # -Wl,-M generates a load map
  162. + set gentoo-LDOPTS=' ' # -Wl,-M generates a load map
  163. # this auxiliary library seems to have disappeared in ifort 10
  164. set FORTLIBS=' '
  165. if($GMS_IFORT_VERNO < 10) set FORTLIBS='-Vaxlib'
  166. @@ -556,12 +551,7 @@
  167. # ln -s liblapack_atlas.so.3.0 liblapack.so
  168. # ln -s liblapack.so.3.0 liblapack.so
  169. # It is strange the RPM's don't do these soft links for us.
  170. - if (-e $GMS_MATHLIB_PATH/libf77blas.a) then
  171. - set MATHLIBS="$GMS_MATHLIB_PATH/libf77blas.a"
  172. - set MATHLIBS="$MATHLIBS $GMS_MATHLIB_PATH/libatlas.a"
  173. - else
  174. - set MATHLIBS="-L$GMS_MATHLIB_PATH -lf77blas -latlas"
  175. - endif
  176. + set MATHLIBS=`${PKG_CONFIG} --libs blas`
  177. set BLAS=' '
  178. breaksw
  179. diff -urN gamess.orig/runall gamess/runall
  180. --- gamess.orig/runall 2009-02-28 00:57:18.000000000 +0100
  181. +++ gamess/runall 2011-10-11 12:27:32.195586568 +0200
  182. @@ -10,7 +10,6 @@
  183. #
  184. # Only the following two lines need to be customized:
  185. #
  186. -chdir /u1/mike/gamess
  187. set VERNO=00
  188. #
  189. # Loop over all Ntest jobs supplied with GAMESS
  190. @@ -27,7 +26,7 @@
  191. gms -v $VERNO -q ti -l exam$NUM.log exam$NUM
  192. sleep 5
  193. else
  194. - ./rungms exam$NUM $VERNO 1 >& exam$NUM.log
  195. + rungms exam$NUM $VERNO 1 >& exam$NUM.log
  196. endif
  197. @ i++
  198. end
  199. diff -urN gamess.orig/rungms gamess/rungms
  200. --- gamess.orig/rungms 2011-08-04 21:03:11.000000000 +0200
  201. +++ gamess/rungms 2011-10-11 12:30:05.244448126 +0200
  202. @@ -55,7 +55,7 @@
  203. # one for LoadLeveler "ll-gms" on the IBM SP line.
  204. #
  205. set TARGET=sockets
  206. -set SCR=/scr/$USER
  207. +set SCR=`pwd`
  208. #
  209. set JOB=$1 # name of the input file xxx.inp, give only the xxx part
  210. set VERNO=$2 # revision number of the executable created by 'lked' step
  211. @@ -144,7 +144,7 @@
  212. # used by the NEO method. See NEO's documentation for more details.
  213. #
  214. set echo
  215. -setenv AUXDATA ~mike/gamess/auxdata
  216. +setenv AUXDATA /usr/share/gamess
  217. setenv EXTBAS /dev/null
  218. setenv NUCBAS /dev/null
  219. setenv POSBAS /dev/null
  220. @@ -153,12 +153,12 @@
  221. setenv MCPPATH $AUXDATA/MCP
  222. setenv BASPATH $AUXDATA/BASES
  223. setenv QUANPOL $AUXDATA/QUANPOL
  224. -setenv MAKEFP ~$USER/scr/$JOB.efp
  225. -setenv GAMMA ~$USER/scr/$JOB.gamma
  226. -setenv TRAJECT ~$USER/scr/$JOB.trj
  227. -setenv RESTART ~$USER/scr/$JOB.rst
  228. +setenv MAKEFP $SCR/$JOB.efp
  229. +setenv GAMMA $SCR/$JOB.gamma
  230. +setenv TRAJECT $SCR/$JOB.trj
  231. +setenv RESTART $SCR/$JOB.rst
  232. setenv INPUT $SCR/$JOB.F05
  233. -setenv PUNCH ~$USER/scr/$JOB.dat
  234. +setenv PUNCH $SCR/$JOB.dat
  235. setenv AOINTS $SCR/$JOB.F08
  236. setenv MOINTS $SCR/$JOB.F09
  237. setenv DICTNRY $SCR/$JOB.F10
  238. @@ -347,7 +347,7 @@
  239. if (null$4 == null) set ELGNAME=ELGFILE
  240. set echo
  241. setenv AOINTS $SCR/$ELGNAME.F08
  242. - setenv ELGDOS ~$USER/scr/$JOB.ldos
  243. + setenv ELGDOS $SCR/$JOB.ldos
  244. setenv ELGDAT $SCR/$ELGNAME.F71
  245. setenv ELGPAR $SCR/$ELGNAME.F72
  246. setenv ELGCUT $SCR/$ELGNAME.F74
  247. @@ -500,7 +500,7 @@
  248. if ($os == AIX) set GMSPATH=/u1/mike/gamess
  249. if ($os == Darwin) set GMSPATH=/Users/mike/desktop/gamess
  250. if ($os == HP-UX) set GMSPATH=/zr/mike/gamess
  251. - if ($os == Linux) set GMSPATH=/cu/mike/gamess
  252. + if ($os == Linux) set GMSPATH=/usr/bin
  253. if ($os == OSF1) set GMSPATH=/in/mike/gamess
  254. if ($os == SunOS) set GMSPATH=/hf/mike/gamess
  255. # special compilation for Sun E450 uSPARC (uname also= SunOS)