LinHES Forums
http://forums.linhes.org/

Got any spare CPU cycles?
http://forums.linhes.org/viewtopic.php?f=13&t=10786
Page 11 of 12

Author:  cameraready [ Wed Jan 23, 2008 7:32 am ]
Post subject: 

The linux SMP client does require the 64 bit version, so the default knoppmyth install won't run it. You can run multiple single cpu command line clients, you just need to run each from a separate directory and define different machine IDs for each one.

Author:  john.lofgren [ Wed Jan 23, 2008 9:14 am ]
Post subject: 

cameraready wrote:
The linux SMP client does require the 64 bit version, so the default knoppmyth install won't run it. You can run multiple single cpu command line clients, you just need to run each from a separate directory and define different machine IDs for each one.


Thank you. That is what I have done. Here's a little step-by-step for someone else who might want to do this (Some of the details may be off - I'm doing this from memory):

1. Become mythtv user (su - mythtv)
2. Create a new directory /myth/folding@home2.
3. Copy /myth/folding@home/client.cfg to /myth/folding@home2/client.cfg (you don't need any of the other files in the new directory)
4. Edit /myth/folding@home2/client.cfg. Change the machine ID to 2.
5. Become root user (su -)
6. Copy /etc/init.d/folding to /etc/init.d/folding.orig
7. Edit /etc/init.d/folding. (here's where the details get fuzzy) Add another variable defining your new directory (FOLDING_DIR2=/myth/folding@home2). In the "start" section, copy the two lines that "cd" into the first FOLDING_DIR and then start FOLDING_EXEC. Paste the two lines just below and edit to "cd" into FOLDING_DIR2 before starting another FOLDING_EXEC.
8. Test by running "/etc/init.d/folding stop", then "/etc/init.d/folding start". Then run "top" to see that two instances of fahcorexx are running (it can take a few seconds for them to get going.)

Question 1: If and when I upgrade Knoppmyth, will my new /etc/init.d/folding file be maintained, or will I need to restore my changes after upgrade?

Question 2: Is there a simple and intelligent way that the automated folding installation script could recognize if the machine has multiple cores and then ask the user if he/she wants to run multiple instances?

Cheers,
John

Author:  cameraready [ Tue Jan 29, 2008 1:19 pm ]
Post subject: 

I was able to get the linux SMP client to run under the x64 version of mythbuntu 7.10 with no problems. I haven't tried to connect it to my knoppmyth backend yet though. I'm thinking this might be a nice way to run a full desktop system that occasionally acts as a myth frontend. :idea:

Author:  cecil [ Mon Mar 17, 2008 11:13 pm ]
Post subject: 

Don't forget about our F@H team folks. At the moment, we are #131!

Author:  BluesBrian [ Sun Apr 13, 2008 7:05 pm ]
Post subject: 

cecil wrote:
Don't forget about our F@H team folks. At the moment, we are #131!


Looks like we've slipped to #134. :cry: but check out our score.. I bet our team certificate is good at any bar in town! :D (15 million score point! .. What's a "score point" worth :?: ) I'm shootin' for 100,000 score points. (ya gotta have a goal!) We currently have 20 members that are over 100K.. if all rise together.. we'll have 25 members over 100k, too! That would be fabulous! :lol:

Author:  Human [ Wed Jun 18, 2008 4:41 pm ]
Post subject: 

I just saw this on digg: http://folding.stanford.edu/English/FAQ-NVIDIA

It would be interesting to see if it'd integrate into KM.

Author:  BluesBrian [ Thu Jun 19, 2008 7:51 am ]
Post subject: 

Human wrote:
I just saw this on digg: http://folding.stanford.edu/English/FAQ-NVIDIA

It would be interesting to see if it'd integrate into KM.


hmmm.. unfortunately, I don't see anything about a Linux Client, other than ...
Quote:
(Linux and OSX may be a possibility in the future.)
(crossing fingers!)

Author:  larrybpsu [ Sat Oct 04, 2008 9:16 pm ]
Post subject: 

john.lofgren wrote:
Question 2: Is there a simple and intelligent way that the automated folding installation script could recognize if the machine has multiple cores and then ask the user if he/she wants to run multiple instances?

Have any of the script wizards put some consideration into this for R6? Even re-tweaking the script for R5.5 or R5F27?? Winter is approaching, and I'd like to try firing up a second instance of F@H on my dual core AMD's to see if they'll help keep my heating oil bill down. I've got another 4.8GHz of processor speed to tap. :)

BTW: my F@H name for the team is: larryb_home


edit:

I did a bit of poking around and there are two CPU entries in the

/proc/acpi/processor

directory (CPU0 and CPU1) Can the configuration script take a peek there, and loop for each core and make a unique F@H folder?

The remaining issue would be accessing the status links for each core from the web page.

Author:  Gnarl [ Mon Oct 06, 2008 8:09 am ]
Post subject: 

R6 core is still in development by the the big kahunas so not many have seen it yet. If R6 will be available in x64 version it will be just a matter of adding the -smp switch. I'll take a look at writing up a script that will auto detect # of cpus.

Author:  Gnarl [ Mon Oct 06, 2008 10:13 am ]
Post subject: 

** REFINED Multi-CPU FAH client setup for x32 **

This should work for any amount of CPUs. It's been tested on a 1 CPU client, 2 CPU client and 4 CPU client.

Edit fah-detect.sh script
Code:
nano /myth/folding@home/fah-detect.sh

Paste in the following:
Code:
#!/bin/bash
# description: Start Folding At Home execution

# Path where folding tarball and clients live
BASEPATH=/myth/folding@home
URL="http://www.stanford.edu/group/pandegroup/folding/release"
PACKAGE="FAH6.02-Linux.tgz"
LOGFILE=/var/log/folding

# Username from input or old FAH client
USERNAME=$(cat $BASEPATH/client.cfg|grep username|gawk -F'[=]' '{ print $2 }')
[ -z $USERNAME ] && USERNAME=$1

# Error Check username existance
if [ -z $USERNAME ]; then
        echo "Usage: ./fah-detect.sh USERNAME"
        exit 1
fi

# Function to create configs
make_config()
{
cat > $BASEPATH/folding-$cpu/client.cfg << EOF
[settings]
username=$USERNAME
team=50975
passkey=
asknet=no
bigpackets=normal
machineid=$(expr $cpu + 1 )
local=22

[http]
active=no
host=localhost
port=8080

[clienttype]
type=0
EOF

return 0
}

cd $BASEPATH
[ -f $PACKAGE ] || wget $URL/$PACKAGE || exit 2

# Meat of the script, count processors, create folders and setup clients
for cpu in $(cat /proc/cpuinfo|grep processor |gawk '{ print $3 }')
do
        # Make required directories
        mkdir -p $BASEPATH/folding-$cpu

        # Extract folding into required number of clients
        tar xfvz $BASEPATH/$PACKAGE -C $BASEPATH/folding-$cpu

        # Configure each client
        make_config
done

# Set permissions, owner
chmod +x /etc/init.d/fah-control.sh
chown -R mythtv.mythtv $BASEPATH
touch $LOGFILE
chown -R mythtv.mythtv $LOGFILE

# Remove old startup and add new one
update-rc.d fah-control.sh defaults 99
update-rc.d -f folding@home remove

Create the startup script
Code:
nano /etc/init.d/fah-control.sh

Paste in the following:
Code:
#!/bin/bash
# description: Start Folding At Home execution

BASEPATH=/myth/folding@home

case $1 in
    start)
        for cpu in $(cat /proc/cpuinfo|grep processor |gawk '{ print $3 }')
        do
                echo $BASEPATH/folding-$cpu
                cd $BASEPATH/folding-$cpu
                su mythtv -c "./fah6 >> /var/log/folding 2>&1 &"
        done
        exit
        ;;

    stop)
        killall fah6
        ;;
   status)
        for cpu in $(cat /proc/cpuinfo|grep processor |gawk '{ print $3 }')
        do
                echo -e "\nFolding Thread $(expr $cpu + 1 )"
                tail $BASEPATH/folding-$cpu/FAHlog.txt
        done
        exit
        ;;

    *)
        echo "Usage: /etc/init.d/fah.control {start|stop|status}"
        ;;
esac

Make it executable
Code:
chmod +x /myth/folding@home/fah-detect.sh

Run the script as root where USERNAME is your username of the FAH site and if you've never run FAH before, It will autodetect from old client.
Code:
/etc/folding@home/fah-detect.sh {USERNAME}


Reboot or stop the old one and start the new one
Code:
/etc/init.d/folding@home stop
Wait 15 Seconds
Code:
 /etc/init.d/fah-control.sh start

Author:  Gnarl [ Tue Oct 07, 2008 7:45 am ]
Post subject: 

Updated Multi-CPU setup script to auto detect user name from old client.

Author:  larrybpsu [ Tue Oct 07, 2008 7:47 pm ]
Post subject: 

Wow....

Thank you for making that script available so quickly!

Author:  Gnarl [ Thu Apr 23, 2009 10:59 am ]
Post subject: 

WHOOHOOO - I reached 1 MILLION points

Author:  Girkers [ Thu Apr 23, 2009 10:43 pm ]
Post subject: 

Gnarl,

Your last post prompted me to check my score, I have reached 1 Million points as well, I want my picture of Dr Evil too! :P

Author:  Gnarl [ Fri Apr 24, 2009 2:15 pm ]
Post subject: 

Girkers wrote:
Gnarl,

Your last post prompted me to check my score, I have reached 1 Million points as well, I want my picture of Dr Evil too! :P
You too can post a random pic found by playing with your Google

Page 11 of 12 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/