diff options
author | Patrick Kursawe <phosphan@gentoo.org> | 2004-04-22 10:01:17 +0000 |
---|---|---|
committer | Patrick Kursawe <phosphan@gentoo.org> | 2004-04-22 10:01:17 +0000 |
commit | ddffcb0f4386c74132feed80519c2d40b1513e2a (patch) | |
tree | 95fdcdc87d740be1b19f410b8f5d05e6ee0ef2fe /app-sci/foldingathome | |
parent | sync IUSE; error check; tidy (Manifest recommit) (diff) | |
download | gentoo-2-ddffcb0f4386c74132feed80519c2d40b1513e2a.tar.gz gentoo-2-ddffcb0f4386c74132feed80519c2d40b1513e2a.tar.bz2 gentoo-2-ddffcb0f4386c74132feed80519c2d40b1513e2a.zip |
Can use more than one CPU now, see bug #47526
Diffstat (limited to 'app-sci/foldingathome')
-rw-r--r-- | app-sci/foldingathome/ChangeLog | 11 | ||||
-rw-r--r-- | app-sci/foldingathome/Manifest | 5 | ||||
-rw-r--r-- | app-sci/foldingathome/files/digest-foldingathome-4.0.0-r1 | 1 | ||||
-rw-r--r-- | app-sci/foldingathome/files/folding-conf.d | 27 | ||||
-rw-r--r-- | app-sci/foldingathome/files/folding-init.d-r2 | 26 | ||||
-rw-r--r-- | app-sci/foldingathome/files/initfolding-r1 | 19 | ||||
-rw-r--r-- | app-sci/foldingathome/foldingathome-3.24.ebuild | 4 | ||||
-rw-r--r-- | app-sci/foldingathome/foldingathome-4.0.0-r1.ebuild | 77 |
8 files changed, 167 insertions, 3 deletions
diff --git a/app-sci/foldingathome/ChangeLog b/app-sci/foldingathome/ChangeLog index a9e4fe704df2..5a64e9ba9653 100644 --- a/app-sci/foldingathome/ChangeLog +++ b/app-sci/foldingathome/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-sci/foldingathome # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-sci/foldingathome/ChangeLog,v 1.10 2004/03/26 12:13:49 phosphan Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-sci/foldingathome/ChangeLog,v 1.11 2004/04/22 10:01:16 phosphan Exp $ + +*foldingathome-4.0.0-r1 (22 Apr 2004) + + 22 Apr 2004; Patrick Kursawe <phosphan@gentoo.org> + foldingathome-4.0.0-r1.ebuild, files/folding-conf.d, + files/folding-init.d-r2, files/initfolding-r1: + Added support to run multiple clients for those with multiprocessors + and the ability to pass options to the Folding clients. + Based on bug #47526 (by Mike Caley <mjcaley@darkarctic.com>) 26 Mar 2004; Patrick Kursawe <phosphan@gentoo.org> foldingathome-3.14.ebuild, foldingathome-3.24-r1.ebuild, diff --git a/app-sci/foldingathome/Manifest b/app-sci/foldingathome/Manifest index 8fe9999a3dd4..ac3468c91f6f 100644 --- a/app-sci/foldingathome/Manifest +++ b/app-sci/foldingathome/Manifest @@ -1,12 +1,17 @@ MD5 09a901ad29cf6a7069ef13bd064d0cb9 foldingathome-3.24-r1.ebuild 1590 +MD5 c68ec040a71e9c20f480c749e6bf2034 foldingathome-4.0.0-r1.ebuild 1842 MD5 22c17dabc894de519cc509f0d710a1f8 foldingathome-4.0.0.ebuild 1456 MD5 2943aac6ca4fca5b328ad399fdeebb0e ChangeLog 1836 MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156 MD5 3543c3e6d6dc0473a158bb7d5ee5ae2b foldingathome-3.24.ebuild 1302 +MD5 a586f7af900f3c15982e59730e7e082a files/folding-conf.d 1125 MD5 91f88a421f87928d798002ede77fa8f9 files/initfolding 80 MD5 2ce9c3c1a96617c6caadff6e24ef32e9 files/folding-init.d 539 +MD5 580011119c38d13914475bc20b361196 files/initfolding-r1 593 +MD5 6c633c6cc20e087d9da4585c5d9563dc files/digest-foldingathome-4.0.0-r1 66 MD5 ad7ecc18b7b0f523434d668ba40295f4 files/digest-foldingathome-3.24-r1 143 MD5 398541541417353090c2a40cb4fe4a3b files/folding-init.d-r1 746 +MD5 663651c30d96d6a1f4f4d21d32e8b055 files/folding-init.d-r2 615 MD5 aec1f2de50cf95bf1797d61ae94b3b04 files/folding.sh 88 MD5 ad7ecc18b7b0f523434d668ba40295f4 files/digest-foldingathome-3.24 143 MD5 6c633c6cc20e087d9da4585c5d9563dc files/digest-foldingathome-4.0.0 66 diff --git a/app-sci/foldingathome/files/digest-foldingathome-4.0.0-r1 b/app-sci/foldingathome/files/digest-foldingathome-4.0.0-r1 new file mode 100644 index 000000000000..6018adcfd4d5 --- /dev/null +++ b/app-sci/foldingathome/files/digest-foldingathome-4.0.0-r1 @@ -0,0 +1 @@ +MD5 d8ca3f78a3fff62059b780891d4c1e06 FAH4Console-Linux.exe 246740 diff --git a/app-sci/foldingathome/files/folding-conf.d b/app-sci/foldingathome/files/folding-conf.d new file mode 100644 index 000000000000..677bf8b582c6 --- /dev/null +++ b/app-sci/foldingathome/files/folding-conf.d @@ -0,0 +1,27 @@ +# Config file for /etc/init.d/foldingathome + +# Enter options here to be passed to the Folding client: +# +# -oneunit Instruct the client to quit following the completion of one work unit. +# -verbosity x Sets the output level, from 1 to 9 (max). The default is 3 +# -pause Pause after finishing & trying to send current unit +# -forceasm Force core assembly optimizations to be used if available +# -forceSSE On machines with an AMD processor, Core_78 gives priority to 3DNow over +# SSE -- this overrides that. +# -advmethods Request to be assigned any new Cores or work units. +# +# A full listing of options can be found here: +# http://www.stanford.edu/group/pandegroup/folding/console-userguide.html +# But use of other options are not recommended when using the Folding client +# as a service. +# +FOLD_OPTS="-advmethods" + +# Number of clients to run +# +# Folding@Home isn't multithreaded, so if you're running multiple CPU's +# you will need to run a client to run for each of your CPU's in order +# to achieve the best performance for Folding@Home. Up to a maximum of 8. +# Ex. A dual CPU system would use CPU=2 +# +CPU=1 diff --git a/app-sci/foldingathome/files/folding-init.d-r2 b/app-sci/foldingathome/files/folding-init.d-r2 new file mode 100644 index 000000000000..c9d87cffa2c6 --- /dev/null +++ b/app-sci/foldingathome/files/folding-init.d-r2 @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-sci/foldingathome/files/folding-init.d-r2,v 1.1 2004/04/22 10:01:17 phosphan Exp $ + +start() { + ebegin "Starting Folding@Home" + for (($CPU; CPU != 0; CPU--)) + do + cd /opt/foldingathome/client${CPU}/ + rm -f /opt/foldingathome/log-${CPU} + nice -n 20 su foldingathome -c "/opt/foldingathome/client${CPU}/foldingathome ${FOLD_OPTS}" 2>&1 >/opt/foldingathome/log-${CPU} & + done + eend $? +} + +stop() { + ebegin "Stopping Folding@Home" + for I in FahCore*.exe + do + killall -q $I >/dev/null + done + killall foldingathome >/dev/null + eend $? +} + diff --git a/app-sci/foldingathome/files/initfolding-r1 b/app-sci/foldingathome/files/initfolding-r1 new file mode 100644 index 000000000000..aa62f2cc47a3 --- /dev/null +++ b/app-sci/foldingathome/files/initfolding-r1 @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +import os, shutil + +os.chdir("/opt/foldingathome/client1") +os.system("/opt/foldingathome/client1/foldingathome -configonly") +os.system("chown -R foldingathome:nogroup /opt/foldingathome") + +clientnum = (1, 2, 3, 4, 5, 6, 7, 8) + +for i in clientnum: + shutil.copyfile("/opt/foldingathome/client1/client.cfg", "/opt/foldingathome/client%d/client.cfg" % (i)) + clientfile = open("/opt/foldingathome/client%d/client.cfg" % (i), "r") + lines = clientfile.readlines() + lines[4] = "machineid=%d\n" % (i) + clientfile.close() + clientfile = open("/opt/foldingathome/client%d/client.cfg" % (i), "w") + clientfile.writelines(lines) + clientfile.close() diff --git a/app-sci/foldingathome/foldingathome-3.24.ebuild b/app-sci/foldingathome/foldingathome-3.24.ebuild index 72de56bdfda0..83dce1f90289 100644 --- a/app-sci/foldingathome/foldingathome-3.24.ebuild +++ b/app-sci/foldingathome/foldingathome-3.24.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-sci/foldingathome/foldingathome-3.24.ebuild,v 1.4 2004/03/26 12:13:49 phosphan Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-sci/foldingathome/foldingathome-3.24.ebuild,v 1.5 2004/04/22 10:01:16 phosphan Exp $ # no version number on this install dir since upgrades will be using same dir # (data will be stored here too) diff --git a/app-sci/foldingathome/foldingathome-4.0.0-r1.ebuild b/app-sci/foldingathome/foldingathome-4.0.0-r1.ebuild new file mode 100644 index 000000000000..59b686acbf3e --- /dev/null +++ b/app-sci/foldingathome/foldingathome-4.0.0-r1.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-sci/foldingathome/foldingathome-4.0.0-r1.ebuild,v 1.1 2004/04/22 10:01:17 phosphan Exp $ + +# no version number on this install dir since upgrades will be using same dir +# (data will be stored here too) +I="/opt/foldingathome" + +inherit eutils + +DESCRIPTION="Help simulate protein folding at home" +HOMEPAGE="http://folding.stanford.edu/" +SRC_URI="http://www.stanford.edu/group/pandegroup/release/FAH4Console-Linux.exe" +RESTRICT="nomirror" + +SLOT="0" +IUSE="" +LICENSE="as-is" +KEYWORDS="~x86" + +DEPEND=">=sys-apps/baselayout-1.8.0 + >=sys-libs/glibc-2.3.0 + amd64? ( app-emulation/emul-linux-x86-baselibs )" + +S="${WORKDIR}" + +src_unpack() { + cp "${DISTDIR}/${A}" ${PN} +} + +src_install() { + exeinto ${I} + newexe ${FILESDIR}/initfolding-r1 initfolding + + # Clients + exeinto ${I}/client1 + doexe foldingathome + exeinto ${I}/client2 + doexe foldingathome + exeinto ${I}/client3 + doexe foldingathome + exeinto ${I}/client4 + doexe foldingathome + exeinto ${I}/client5 + doexe foldingathome + exeinto ${I}/client6 + doexe foldingathome + exeinto ${I}/client7 + doexe foldingathome + exeinto ${I}/client8 + doexe foldingathome + exeinto /etc/init.d + newexe ${FILESDIR}/folding-init.d-r2 foldingathome + + insinto /etc/conf.d + newins ${FILESDIR}/folding-conf.d foldingathome +} + +pkg_preinst() { + enewuser foldingathome -1 /bin/bash /opt/foldingathome +} + +pkg_postinst() { + chown -R foldingathome:nogroup /opt/foldingathome + einfo "To run Folding@home in the background at boot:" + einfo " rc-update add foldingathome default" + einfo "" + einfo "Please run ${I}/initfolding to configure your client" + einfo "and edit /etc/conf.d/foldingathome for options" + einfo "" +} + +pkg_postrm() { + einfo "Folding@home data files were not removed." + einfo " Remove them manually from ${I}" + einfo "" +} |