Forums | MacLife
You are not logged in.
#1 2007-09-06 10:48 pm
- otsep
- Member

- From: Virginia
- Registered: 2007-09-06
- Posts: 88
Distributed(Xgrid) F@H
I have access to about 200+ Xserve's and I'd like to put their idle time to use. Is there an easy way to set them all up with F@H via Xgrid or a similar app? I'd like to have a command line version on each server, running during a specified window, managed by my workstation.
Offline
#2 2007-09-07 4:02 am
- Nefarious
- Tuning Fork
- Moderator

- From: 45°22"N 84°57"W
- Registered: 2002-09-30
- Posts: 7996
Re: Distributed(Xgrid) F@H
Holy cow.
Are these Intel Xserves ? Sending email to Artemis about this.
I do have an installer script to run in Terminal which is faster to install by a minute than our standard installer. I would need to update this with the correct software for Intel Macs.
Let me check this after work or so. See you in 12 hours.
Offline
#3 2007-09-07 7:05 am
Re: Distributed(Xgrid) F@H
If you have Remote Desktop on all these, we could simply install it all at once with one string of commands. That's how I do it.
We need to know:
1)Are these Intels or PowerPCs?
2)Do you want to utilize "all" idle time, or a schedule?
Offline
#4 2007-09-07 8:41 am
Re: Distributed(Xgrid) F@H
I just re-read your post, otsep.
By "running during a specified window", I assume you mean running only during certain hours?
The way I setup the schedule on my computers is to edit the crontab initially during installation. If you intend to change this often, you would need a separate script to edit the crontab on your workstations (Xserves).
Also of note, Xgrid is not really an option for folding@home. The folding client itself is doing the multiprocessing amongst the cpu cores (actually, this only applies to the SMP client, not the PowerPC client).
Let us know more details. We would be glad to help you set these machines up and add them to our team.
Offline
#5 2007-09-08 2:44 am
- otsep
- Member

- From: Virginia
- Registered: 2007-09-06
- Posts: 88
Re: Distributed(Xgrid) F@H
ArtemisG3 wrote:
If you have Remote Desktop on all these, we could simply install it all at once with one string of commands. That's how I do it.
We need to know:
1)Are these Intels or PowerPCs?
2)Do you want to utilize "all" idle time, or a schedule?
1. They are mostly PowerPC.
2. I think a schedule would be best.
Offline
#6 2007-09-08 5:09 am
- Nefarious
- Tuning Fork
- Moderator

- From: 45°22"N 84°57"W
- Registered: 2002-09-30
- Posts: 7996
Re: Distributed(Xgrid) F@H
Okay, so then we need 2 different installers.
Are you able to administer the Xserves in groups: All PowerPC's in 1 group and and the Intels in another ? (I have no experience with Remote Desktop)
Offline
#7 2007-09-08 10:05 am
- otsep
- Member

- From: Virginia
- Registered: 2007-09-06
- Posts: 88
Re: Distributed(Xgrid) F@H
Nefarious wrote:
Are you able to administer the Xserves in groups: All PowerPC's in 1 group and and the Intels in another ? (I have no experience with Remote Desktop)
Yes you can.
Offline
#8 2007-09-08 12:07 pm
Offline
#9 2007-09-08 8:17 pm
- otsep
- Member

- From: Virginia
- Registered: 2007-09-06
- Posts: 88
Re: Distributed(Xgrid) F@H
ArtemisG3 wrote:
Let us know what hours you want folding@home to run.
I'm comfortable in the command line so if it's a cron or launchd thing I can handle it. Besides, I don't want it gift-wrapped for me. 
From what I've gathered here, all I need to do is get the command line installer and change the cron job to only run during my window.
Last edited by otsep (2007-09-08 8:47 pm)
Offline
#10 2007-09-08 8:32 pm
Re: Distributed(Xgrid) F@H
Read this:
http://geek.thinkunique.org/2007/07/12/ … off-hours/
Oops, I forgot to mention that those instructions are for the Intel SMP client.
This is how I install it on my workstations. Notice this section:
Code:
echo "0 18 * * 1,2,3,4,5 cd ~/Library/Folding@home/; nohup ./fah5 -local -advmethods -forceasm &" > tmpcron; echo "0 7 * * 1,2,3,4,5 killall fah5" >> tmpcron; echo "" >> tmpcron; crontab tmpcron
This is where I install the cron schedule for folding@home.
Last edited by ArtemisG3 (2007-09-08 8:36 pm)
Offline
#11 2007-09-08 8:38 pm
Re: Distributed(Xgrid) F@H
Here is how I install the PowerPC client:
Code:
mkdir ~/.fah1/; cd ~/.fah1/; hdid http://www.stanford.edu/group/pandegroup/release/FAH5.02-CLI.dmg; cp /Volumes/FAH5-CLI/fah5 ~/.fah1/; chmod +x ~/.fah1/fah5; cd ~/.fah1/; echo '[settings]' > ~/.fah1/client.cfg; echo 'username=ArtemisG3@mac.com' >> ~/.fah1/client.cfg; echo 'team=18' >> ~/.fah1/client.cfg; echo 'asknet=no' >> ~/.fah1/client.cfg; echo 'bigpackets=yes' >> ~/.fah1/client.cfg; echo 'machineid=1' >> ~/.fah1/client.cfg; echo '' >> ~/.fah1/client.cfg; echo '[http]' >> ~/.fah1/client.cfg; echo 'active=no' >> ~/.fah1/client.cfg; echo 'host=localhost' >> ~/.fah1/client.cfg; echo 'port=8080' >> ~/.fah1/client.cfg; echo '' >> ~/.fah1/client.cfg; echo "0 18 * * 1,2,3,4,5 cd ~/.fah1/; nohup ./fah5 -local -advmethods -forceasm &" > tmpcron; echo "0 7 * * 1,2,3,4,5 killall fah5" >> tmpcron; echo "" >> tmpcron; crontab tmpcron; rm tmpcron; hdiutil unmount -force /Volumes/FAH5-CLI/; nohup ./fah5 -local -advmethods -forceasm &
Offline
#12 2007-09-08 8:43 pm
- Nefarious
- Tuning Fork
- Moderator

- From: 45°22"N 84°57"W
- Registered: 2002-09-30
- Posts: 7996
Re: Distributed(Xgrid) F@H
Otsep needs a Team username ! (unless with Artemis's installer, all of the Team points go to him.)
Any name is fine. Here's the Team user list Team List
You'll be in the top 50 in less than a month with that armada.
Offline
#13 2007-09-08 8:52 pm
#14 2007-09-08 9:01 pm
- otsep
- Member

- From: Virginia
- Registered: 2007-09-06
- Posts: 88
Re: Distributed(Xgrid) F@H
ArtemisG3 wrote:
Read this:
http://geek.thinkunique.org/2007/07/12/ … off-hours/
Oops, I forgot to mention that those instructions are for the Intel SMP client.
I like how he curls the file down. First I'll need to create an internal spot for the installer to sit. There are a couple of things I need to iron out. How do the command line pref's differ on the two platforms? How does it want proxies set. I've already started a script to determine the processor type and select the correct installer.
Offline
#15 2007-09-08 9:04 pm
- Nefarious
- Tuning Fork
- Moderator

- From: 45°22"N 84°57"W
- Registered: 2002-09-30
- Posts: 7996
Re: Distributed(Xgrid) F@H
Note: to change usernames after installing, edit the "client.cfg" file.
You're not carved in stone at all with the username.
-----------
Someone correct me if I am wrong, but is the installer command line good to go, assuming Otsep's team username is inserted ? (name fixed)
Last edited by Nefarious (2007-09-08 9:15 pm)
Offline
#16 2007-09-08 9:06 pm
Re: Distributed(Xgrid) F@H
otsep wrote:
I like how he curls the file down. First I'll need to create an internal spot for the installer to sit. There are a couple of things I need to iron out. How do the command line pref's differ on the two platforms? How does it want proxies set. I've already started a script to determine the processor type and select the correct installer.
The client.cfg is the same on both platforms. I haven't used folding with a proxy, but I believe that is what the port option is for in the client.cfg file.
Offline
#17 2007-09-08 9:08 pm
Re: Distributed(Xgrid) F@H
Nefarious wrote:
Note: to change usernames after installing, edit the "client.cfg" file.
You're not carved in stone at all with the username.
-----------
Someone correct me if I am wrong, but is the installer command line good to go, assuming Otsep's team username is inserted ?
Yeah, it should be simple enough to change the username in the installer (in Apple Script Editor) before running it.
Offline
#18 2007-09-08 9:33 pm
- Nefarious
- Tuning Fork
- Moderator

- From: 45°22"N 84°57"W
- Registered: 2002-09-30
- Posts: 7996
Re: Distributed(Xgrid) F@H
No spaces allowed in the username. 
Offline
#19 2007-09-08 9:42 pm
- otsep
- Member

- From: Virginia
- Registered: 2007-09-06
- Posts: 88
Re: Distributed(Xgrid) F@H
ArtemisG3 wrote:
The client.cfg is the same on both platforms. I haven't used folding with a proxy, but I believe that is what the port option is for in the client.cfg file.
http://fahwiki.net/index.php/Client.cfg … .5Bhttp.5D
Found the proxy config info I needed. 
Offline
#20 2007-09-08 9:47 pm
- Nefarious
- Tuning Fork
- Moderator

- From: 45°22"N 84°57"W
- Registered: 2002-09-30
- Posts: 7996
Re: Distributed(Xgrid) F@H
otsep wrote:
ArtemisG3 wrote:
The client.cfg is the same on both platforms. I haven't used folding with a proxy, but I believe that is what the port option is for in the client.cfg file.
http://fahwiki.net/index.php/Client.cfg … .5Bhttp.5D
Found the proxy config info I needed.
helluva link. 
Offline
#21 2007-09-09 11:26 am
- otsep
- Member

- From: Virginia
- Registered: 2007-09-06
- Posts: 88
Re: Distributed(Xgrid) F@H
Could you test this and let me know what you think. I commented out the last part of it so it won't actually start the F@H application.
Code:
#!/bin/sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin: export PATH
################## Folding@Home Command Line Install ###############
# Shaun Farmer | otsep@mac.com
#
# This script allows you to use one installation
# script for both Intel and PPC F@H command line installs.
#
####################################################################
### Variables ###
username='Foo' # F@H User Name
fahteam='18' # FAH Team Number
IntelPath='http://www.stanford.edu/~kasson/folding/' # Path to Intel file
IntelFileName='FAH_SMP_OSX.tgz' # Intel file name
PPCPath='http://www.stanford.edu/group/pandegroup/release/' # Path to PPC file
PPCFileName='FAH5.02-CLI.dmg' # PPC file name
proxyhost='' # HTTP proxy server (If you don't know, leave blank)
proxyport='' # HTTP proxy Server port (If you don't know, leave blank)
##########################################################
# Please do not edit anything passed this line. #
# If you do, you could potentially damage your system. #
##########################################################
######### Script action #########
processor=`system_profiler | grep "Processor Name:" | sed -e "s/ Processor Name:[ ]*//" | awk '{ print $1 }'`
if [ "$proxyhost" = '' ] ; then
proxyactive='no'
proxyhost='localhost'
proxyport='8080'
else
proxyactive='yes'
fi
mkdir ~/Library/Folding@home/
cd ~/Library/Folding@home/
if [ "$processor" == 'Intel' ] ; then
curl -O ${IntelPath}${IntelFileName}
tar xzf $IntelFileName
else
curl -O ${PPCPath}${PPCFileName}
hdid $PPCFileName > /tmp/fah.hdid
fahPPCvol=`cat /tmp/fah.hdid | grep /Volumes | awk '{ print $3 }'`
cp ${fahPPCvol}/* .
diskutil eject ${fahPPCvol}
fi
echo [settings] > ~/Library/Folding@home/client.cfg
echo username=${username} >> ~/Library/Folding@home/client.cfg
echo team=${fahteam} >> ~/Library/Folding@home/client.cfg
echo asknet=no >> ~/Library/Folding@home/client.cfg
echo bigpackets=yes >> ~/Library/Folding@home/client.cfg
echo machineid=1 >> ~/Library/Folding@home/client.cfg
echo >> ~/Library/Folding@home/client.cfg
echo [http] >> ~/Library/Folding@home/client.cfg
echo active=${proxyactive} >> ~/Library/Folding@home/client.cfg
echo host=${proxyhost} >> ~/Library/Folding@home/client.cfg
echo port=${proxyport} >> ~/Library/Folding@home/client.cfg
echo >> ~/Library/Folding@home/client.cfg
echo [clienttype] >> ~/Library/Folding@home/client.cfg
echo type=3 >> ~/Library/Folding@home/client.cfg
# echo "0 18 * * 1,2,3,4,5 cd ~/Library/Folding@home/
# nohup ./fah5 -local -advmethods -forceasm &" > tmpcron
# echo "0 7 * * 1,2,3,4,5 killall fah5" >> tmpcron
# echo "" >> tmpcron
# crontab tmpcron
# rm tmpcron
# nohup ./fah5 -local -advmethods -forceasm &Last edited by otsep (2007-09-09 11:47 am)
Offline
#22 2007-09-09 12:30 pm
Re: Distributed(Xgrid) F@H
Everything looks good, and it downloaded the proper client on my MacBook.
Offline
#23 2007-09-10 10:25 pm
- otsep
- Member

- From: Virginia
- Registered: 2007-09-06
- Posts: 88
Re: Distributed(Xgrid) F@H
ArtemisG3 wrote:
Everything looks good, and it downloaded the proper client on my MacBook.
Sweet. I'll be doing a test deployment tomorrow on 10 servers. 
Offline
#24 2007-09-10 10:29 pm
- Nefarious
- Tuning Fork
- Moderator

- From: 45°22"N 84°57"W
- Registered: 2002-09-30
- Posts: 7996
Re: Distributed(Xgrid) F@H
We all will be able to see your appearance somewhere on these pages of the Team statistics.
Here's page 5 of the user list. http://folding.extremeoverclocking.com/ … 18&p=5
The Intel Servers will be roughly 3x faster than the PowerPC Servers. Educated guess.
Offline
#25 2007-09-11 11:09 am
Re: Distributed(Xgrid) F@H
otsep wrote:
I have access to about 200+ Xserve's and I'd like to put their idle time to use.
{hands drop to the side}
{hugs}
I has me a new best friend yessir.
Spirit was crushed; now is fading, But I want to help make things right.
Because I can see and I can feel, and you can see and you can feel
So why don't we both either stand up and fight
Or at least together we'll call it a night.
Offline
