summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shvetsov <alexxy@gentoo.org>2009-11-30 14:53:59 +0000
committerAlexey Shvetsov <alexxy@gentoo.org>2009-11-30 14:53:59 +0000
commit853944e241e28d9d5f6cba8134d1df8cfbd76efa (patch)
tree50c897e0666e5894a6d8579da40ce69b2de11a5c /sci-chemistry/gamess
parentKeyworded for ppc. (diff)
downloadhistorical-853944e241e28d9d5f6cba8134d1df8cfbd76efa.tar.gz
historical-853944e241e28d9d5f6cba8134d1df8cfbd76efa.tar.bz2
historical-853944e241e28d9d5f6cba8134d1df8cfbd76efa.zip
[sci-chemistry/gamess] Enable mpi build for gamess-us. It's usefull if you have for example cluster with Infiniband interconnect
Package-Manager: portage-2.2_rc54/cvs/Linux x86_64
Diffstat (limited to 'sci-chemistry/gamess')
-rw-r--r--sci-chemistry/gamess/ChangeLog8
-rw-r--r--sci-chemistry/gamess/Manifest13
-rw-r--r--sci-chemistry/gamess/gamess-20090112.3-r1.ebuild279
3 files changed, 298 insertions, 2 deletions
diff --git a/sci-chemistry/gamess/ChangeLog b/sci-chemistry/gamess/ChangeLog
index b0f34d1166d4..cd0b7e518f70 100644
--- a/sci-chemistry/gamess/ChangeLog
+++ b/sci-chemistry/gamess/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-chemistry/gamess
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/ChangeLog,v 1.37 2009/11/07 16:21:39 volkmar Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/ChangeLog,v 1.38 2009/11/30 14:53:59 alexxy Exp $
+
+*gamess-20090112.3-r1 (30 Nov 2009)
+
+ 30 Nov 2009; Alexey Shvetsov <alexxy@gentoo.org>
+ +gamess-20090112.3-r1.ebuild:
+ Enable mpi build for gamess-us
07 Nov 2009; Mounir Lamouri <volkmar@gentoo.org>
gamess-20090112.1-r1.ebuild:
diff --git a/sci-chemistry/gamess/Manifest b/sci-chemistry/gamess/Manifest
index 40bbd38a1324..1c35c61d7c45 100644
--- a/sci-chemistry/gamess/Manifest
+++ b/sci-chemistry/gamess/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX gamess-20080411.1.gentoo.patch 12549 RMD160 531faefa0d45a8d249c089aec8138783406563e5 SHA1 c8a93487889528d74384096562398f5096a76f5c SHA256 7df4e4c70da0a9029043c86a4607bbc58f35cf4e34994df393e02dcd3ac7f2b5
AUX gamess-20090112.1.gentoo.patch 12259 RMD160 08dea4576f98233af6b36d73fccbe52b8eec4961 SHA1 f24da2cdf997b2d58a7f991111e0555407ce1f3b SHA256 fcaa3aafda7f95b45bbc45d98cb3875048e6b2b3c06730c97492f7b77d120255
DIST gamess-20080411.1.tar.gz 10301653 RMD160 9742a676cc2da693fff78594cdc0edf0f380a2de SHA1 8e0e01b255ebad8e2fd9b2012248648a11212b5c SHA256 493a99448afc6de15b6f054b702c6e67646e020cfee551aca0ef48a374fc6d05
@@ -7,6 +10,14 @@ DIST tinker.tar.Z 1038267 RMD160 7231bdbe1785e98890037d654e8d3eab8ac066cf SHA1 0
EBUILD gamess-20080411.1.ebuild 6449 RMD160 f4ce142a0e539f7d9d6c6b53cb6365b146184296 SHA1 66ed15b13ace9f16e7a1c4898a6177e929938f7f SHA256 851552f6fc1e7f85d1590850c5718c18e7f2748cd0b0361b0a665be746c30d08
EBUILD gamess-20090112.1-r1.ebuild 7711 RMD160 cf27a39cbd5d355e934b31a2c36be200f9c45b3d SHA1 5e4e95dfc4ffdeea724e658c2e90bb7c57641e99 SHA256 9db00c8b9bc6ce4f840995886fdfd0d441786af843a7918fbdae1f78a05e2f92
EBUILD gamess-20090112.1.ebuild 6456 RMD160 f26f2ccab0b5c230da6be09efd017555f6a815be SHA1 3ff4edc79c03d71f457101616b2ace00c4b0c066 SHA256 5674413ba5f411e9a5cde75677387c87fdf62d8f0eb65ddbf7b2e136807ffefa
+EBUILD gamess-20090112.3-r1.ebuild 8648 RMD160 663e5f855201dcb1571f1b5d3d5c473a711e31d0 SHA1 cd4c87cabaad157e368a0243810fcb6318d84155 SHA256 9f17b306ebe33ca512783e28fa3794b3c6c434178dfa967b59b50259197f4e26
EBUILD gamess-20090112.3.ebuild 8092 RMD160 3ed0193d970f44ee1ad69008f1dbd687bd80db08 SHA1 bd4939fbf4d0752926b3b4c729d6cd0e8204edde SHA256 2bb1b4d791156fc28f562a871ed035eb950e59c182f247778e736bdb79480347
-MISC ChangeLog 8277 RMD160 3e3fcc330aa24238001c401f2ce0b3127c025a23 SHA1 ecbaf272e28542535230992f4fe877dd433e927b SHA256 929fed805c250964c1eb9f317cefcc8ffd23fb88df8936dff67ba8fcc8abfb7e
+MISC ChangeLog 8430 RMD160 a9b8cee9231d8c6cc6655d70f2252bfd4208c459 SHA1 125bff5d96a531d216fd5e9c823629975053bc99 SHA256 8c9278e6ef0231078925e50c0d7ec4a6463b53d71790b56821d5f8856b7a8650
MISC metadata.xml 432 RMD160 36785f37503fb3d7ab09a459d5c146ba9f2639c5 SHA1 3e7483cf552e4946b0791b97f40fae541c8ee1aa SHA256 bcc821dc1c54441f16d9b763e7dd172cc8a1f9b51a6e93fa9af5dc2fa56f3e8d
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.13 (GNU/Linux)
+
+iEYEARECAAYFAksT3KcACgkQ5BmOA85PVLhPeQCfX4Y4E3MuJxzq6q+7kQSgp+Qo
+t3sAoIg9NfeDGQy6W/MVk35ZrMC/AumH
+=VQwj
+-----END PGP SIGNATURE-----
diff --git a/sci-chemistry/gamess/gamess-20090112.3-r1.ebuild b/sci-chemistry/gamess/gamess-20090112.3-r1.ebuild
new file mode 100644
index 000000000000..4bb9c9e7214e
--- /dev/null
+++ b/sci-chemistry/gamess/gamess-20090112.3-r1.ebuild
@@ -0,0 +1,279 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/gamess-20090112.3-r1.ebuild,v 1.1 2009/11/30 14:53:59 alexxy Exp $
+
+EAPI="2"
+
+inherit eutils toolchain-funcs fortran flag-o-matic
+
+DESCRIPTION="A powerful quantum chemistry package"
+LICENSE="gamess"
+HOMEPAGE="http://www.msg.chem.iastate.edu/GAMESS/GAMESS.html"
+SRC_URI="
+ ${P}.tar.gz
+ qmmm-tinker? ( tinker.tar.Z )"
+
+SLOT="0"
+# NOTE: PLEASE do not stabilize gamess. It does not make sense
+# since the tarball has fetch restrictions and upstream only
+# provides the latest version. In other words: As soon as a
+# new version comes out the stable version will be useless since
+# users can not get at the tarball any more.
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="hardened mpi qmmm-tinker"
+
+RESTRICT="fetch"
+
+DEPEND="app-shells/tcsh
+ hardened? ( sys-apps/paxctl )
+ mpi? ( virtual/mpi )
+ virtual/blas"
+
+RDEPEND="${DEPEND}
+ net-misc/openssh"
+
+S="${WORKDIR}/${PN}"
+
+GAMESS_DOWNLOAD="http://www.msg.ameslab.gov/GAMESS/License_Agreement.html"
+GAMESS_VERSION="12 JAN 2009 (R3)"
+FORTRAN="ifc g77 gfortran"
+
+pkg_nofetch() {
+ echo
+ elog "Please download ${PN}-current.tar.gz from"
+ elog "${GAMESS_DOWNLOAD}."
+ elog "Be sure to select the version ${GAMESS_VERSION} tarball!!"
+ elog "Then move the tarball to"
+ elog "${DISTDIR}/${P}.tar.gz"
+ if use qmmm-tinker ; then
+ elog "Also download http://www.msg.ameslab.gov/GAMESS/tinker.tar.Z"
+ elog "and place tinker.tar.Z to ${DISTDIR}"
+ fi
+ echo
+}
+
+pkg_setup() {
+ fortran_pkg_setup
+
+ # currently amd64 is only supported with gfortran
+ if [[ "${ARCH}" == "amd64" ]] && [[ "${FORTRANC}" != "gfortran" ]];
+ then die "You will need gfortran to compile gamess on amd64"
+ fi
+
+ if use qmmm-tinker; then
+ einfo "By default MM subsistem is restricted to 1000 atoms"
+ einfo "if you want larger MM subsystems then you should set"
+ einfo "QMMM_GAMESS_MAXMM variable to needed value in your make.conf"
+ ebeep 5
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ if use qmmm-tinker; then
+ mv tinker gamess/ || die "failed to move tinker directory"
+ fi
+}
+
+src_prepare() {
+ # apply LINUX-arch patches to gamess makesfiles
+ epatch "${FILESDIR}"/${PN}-20090112.1.gentoo.patch
+ # select arch
+ # NOTE: please leave lked alone; it should be good as is!!
+ cd "${S}"
+ local active_arch;
+ if [[ "${ARCH}" == "amd64" ]]; then
+ active_arch="linux64";
+ else
+ active_arch="linux32";
+ fi
+ sed -e "s:gentoo-target:${active_arch}:" \
+ -i comp compall ddi/compddi \
+ || die "Failed to select proper architecure"
+
+ # for hardened-gcc let't turn off ssp, since it breakes
+ # a few routines
+ if use hardened && [[ "${FORTRANC}" = "g77" ]]; then
+ FFLAGS="${FFLAGS} -fno-stack-protector-all"
+ fi
+
+ # Enable mpi stuff
+ if use mpi; then
+ sed -e "s:set COMM = sockets:set COMM = mpi:g" \
+ -i ddi/compddi || die "Enabling mpi build failed"
+ sed -e "s:MPI_INCLUDE_PATH = ' ':MPI_INCLUDE_PATH = '-I/usr/include ':g" \
+ -i ddi/compddi || die "Enabling mpi build failed"
+ sed -e "s:MSG_LIBRARIES='../ddi/libddi.a -lpthread':MSG_LIBRARIES='../ddi/libddi.a -lmpi -lpthread':g" \
+ -i lked || die "Enabling mpi build failed"
+ fi
+
+ # enable NEO
+ sed -e "s:NEO=false:NEO=true:" -i compall lked || \
+ die "Failed to enable NEO code"
+ # enable GAMESS-qmmm
+ if use qmmm-tinker; then
+ sed -e "s:TINKER=false:TINKER=true:" -i compall lked || \
+ die "Failed to enable TINKER code"
+ if [ "x$QMMM_GAMESS_MAXMM" == "x" ]; then
+ einfo "No QMMM_GAMESS_MAXMM set. Using default value = 1000"
+ else
+ einfo "Setting QMMM_GAMESS_MAXMM to $QMMM_GAMESS_MAXMM"
+ sed -e "s:maxatm=1000:maxatm=$QMMM_GAMESS_MAXMM:g" \
+ -i tinker/sizes.i \
+ || die "Setting QMMM_GAMESS_MAXMM failed"
+ sed -e "s:MAXATM=1000:MAXATM=$QMMM_GAMESS_MAXMM:g" \
+ -i source/inputb.src \
+ || die "Setting QMMM_GAMESS_MAXMM failed"
+ fi
+ fi
+ # greate proper activate sourcefile
+ cp "./tools/actvte.code" "./tools/actvte.f" || \
+ die "Failed to create actvte.f"
+ sed -e "s/^\*UNX/ /" -i "./tools/actvte.f" || \
+ die "Failed to perform UNX substitutions in actvte.f"
+
+ # fix GAMESS' compall script to use proper CC
+ sed -e "s|\$CCOMP -c \$extraflags source/zunix.c|$(tc-getCC) -c \$extraflags source/zunix.c|" \
+ -i compall || die "Failed setting up compall script"
+
+ # insert proper FFLAGS into GAMESS' comp makefile
+ # in case we're using ifc let's strip all the gcc
+ # specific stuff
+ if [[ "${FORTRANC}" == "ifc" ]]; then
+ sed -e "s/gentoo-OPT = '-O2'/OPT = '${FFLAGS} -quiet'/" \
+ -e "s/gentoo-g77/${FORTRANC}/" \
+ -i comp || die "Failed setting up comp script"
+ elif ! use x86; then
+ sed -e "s/-malign-double //" \
+ -e "s/gentoo-OPT = '-O2'/OPT = '${FFLAGS}'/" \
+ -e "s/gentoo-g77/${FORTRANC}/" \
+ -i comp || die "Failed setting up comp script"
+ else
+ sed -e "s/gentoo-OPT = '-O2'/OPT = '${FFLAGS}'/" \
+ -e "s/gentoo-g77/${FORTRANC}/" \
+ -i comp || die "Failed setting up comp script"
+ fi
+
+ # fix up GAMESS' linker script;
+ sed -e "s/gentoo-g77/${FORTRANC}/" \
+ -e "s/gentoo-LDOPTS=' '/LDOPTS='${LDFLAGS}'/" \
+ -i lked || die "Failed setting up lked script"
+
+ # fix up GAMESS' ddi TCP/IP socket build
+ sed -e "s/gentoo-CC = 'gcc'/CC = '$(tc-getCC)'/" \
+ -e "s/gentoo-g77/${FORTRANC}/" \
+ -i ddi/compddi || die "Failed setting up compddi script"
+
+ # fix up the checker scripts for gamess tests
+ sed -e "s:set GMSPATH:#set GMSPATH:g" \
+ -e "s:\$GMSPATH/tools/checktst:.:g" \
+ -i tools/checktst/checktst
+}
+
+src_compile() {
+ # build actvte
+ cd "${S}"/tools
+ "${FORTRANC}" -o actvte.x actvte.f || \
+ die "Failed to compile actvte.x"
+
+ # for hardened (PAX) users and ifc we need to turn
+ # MPROTECT off
+ if [[ "${FORTRANC}" == "ifc" ]] && use hardened; then
+ /sbin/paxctl -PemRxS actvte.x 2> /dev/null || \
+ die "paxctl failed on actvte.x"
+ fi
+
+ # build gamess
+ cd "${S}"
+ ./compall || die "compall failed"
+
+ # build the ddi TCP/IP socket stuff
+ cd ${S}/"ddi"
+ ./compddi || die "compddi failed"
+
+ # finally, link it all together
+ cd "${S}"
+ ./lked || die "lked failed"
+
+ # for hardened (PAX) users and ifc we need to turn
+ # MPROTECT off
+ if [[ "${FORTRANC}" == "ifc" ]] && use hardened; then
+ /sbin/paxctl -PemRxS ${PN}.00.x 2> /dev/null || \
+ die "paxctl failed on actvte.x"
+ fi
+}
+
+src_install() {
+ # the executables
+ dobin ${PN}.00.x rungms \
+ || die "Failed installing binaries"
+ if !use mpi; then
+ dobin ddi/ddikick.x \
+ || die "Failed installing binaries"
+ fi
+
+ # the docs
+ dodoc *.DOC qmnuc/*.DOC || die "Failed installing docs"
+
+ # install ericftm
+ insinto /usr/share/${PN}/ericfmt
+ doins ericfmt.dat || die "Failed installing ericfmt.dat"
+
+ # install mcpdata
+ insinto /usr/share/${PN}/mcpdata
+ doins mcpdata/* || die "Failed installing mcpdata"
+
+ # install tinker params in case of qmmm
+ if use qmmm-tinker ; then
+ dodoc tinker/simomm.doc || die "Failed installing docs"
+ insinto /usr/share/${PN}
+ doins -r tinker/params || die "Failed to install Tinker params"
+ fi
+
+ # install the tests the user should run, and
+ # fix up the runscript; also grab a copy of rungms
+ # so the user is ready to run the tests
+ insinto /usr/share/${PN}/tests
+ insopts -m0644
+ doins tests/* || die "Failed installing tests"
+ insopts -m0744
+ doins runall || die "Failed installing tests"
+ doins tools/checktst/checktst tools/checktst/chkabs || \
+ die "Failed to install main test checker"
+ doins tools/checktst/exam* || \
+ die "Failed to install individual test files"
+
+ insinto /usr/share/${PN}/neotests
+ insopts -m0644
+ doins -r qmnuc/neotests/* || die "Failed to install NEO tests"
+}
+
+pkg_postinst() {
+ echo
+ einfo "Before you use GAMESS for any serious work you HAVE"
+ einfo "to run the supplied test files located in"
+ einfo "/usr/share/gamess/tests and check them thoroughly."
+ einfo "Otherwise all scientific publications resulting from"
+ einfo "your GAMESS runs should be immediately rejected :)"
+ einfo "To do so copy the content of /usr/share/gamess/tests"
+ einfo "to some temporary location and execute './runall'. "
+ einfo "Then run the checktst script in the same directory to"
+ einfo "validate the tests."
+ einfo "Please consult TEST.DOC and the other docs!"
+
+ if [[ "${FORTRANC}" == "ifc" ]]; then
+ echo
+ ewarn "IMPORTANT NOTE: We STRONGLY recommend to stay away"
+ ewarn "from ifc-9.0 for now and use the ifc-8.1 series of"
+ ewarn "compilers UNLESS you can run through ALL of the "
+ ewarn "test cases (see above) successfully."
+ fi
+
+ echo
+ einfo "If you want to run on more than a single CPU"
+ einfo "you will have to acquaint yourself with the way GAMESS"
+ einfo "does multiprocessor runs and adjust rungms according to"
+ einfo "your target network architecture."
+ echo
+}