View Full Version : Installing FAH in Linux
Crypto
8 May 2006, 06:04pm
OK, very new entrant in to Linux here. Just installed Ubuntu and am feeling my way around.
Whilst I'm exploring, my Windows OS isn't folding!
I'v downloaded the Linux version of FAH and I have a file entitled FAH504-Linux.exe sitting on my otherwise empty desktop.
What do I do with it?
I am very new at this.....
Thanks
citrixmeta
8 May 2006, 06:26pm
here ya go friend,
http://folding.stanford.edu/linux.html
dump that exe into a folder, and run
chmod +x FAH504-Linux.exe
then
./FAH504-Linux.exe
and fill in the required info and your set!
for more commands, look here.. http://fah-web.stanford.edu/console-userguide.txt
one note though, while building my cluster, ive read alot of articles about folding slowdown under linux, some say its actually FASTER to fold win32 under WINE :o
thats how my cluster is folding today.
get started with this and we can compare scores.
Crypto
8 May 2006, 07:48pm
OK,
found this link ( http://www.short-media.com/forum/attachment.php?attachmentid=17594&d=1127851865) and managed to get FAH running(with lots of modifications, Linux sure is steep learning curve)
However, I can't seem to work out how to keep it running in the background and to start automatically on reboot.
are the commands required specific to Ubuntu? The commands from Prime's article didn't work.
Thanks
Crypto
citrixmeta
8 May 2006, 07:53pm
Taken from here (http://techreport.com/etc/folding/#Linux)
"Creating a script to launch the client in the background
You can easily create a script that will run the client as a background process. Using whatever plain text editor is bundled with your GUI (or vi if you're a seasoned UNIX hacker, or just plain masochistic), create the following text file:
#!/bin/bash
./FAH502-Linux.exe -forceasm >>folding.log 2>&1 &
I've included the -forceasm switch as an example; you can also specify any other switches you want to pass to the client. Save the above file to a short, easy to remember file name, like go. Also mark the file as executable, by entering the following command in your terminal window: chmod +x go. From now on, you can launch the client in the background simply by navigating to your folding directory, and typing: ./go"
Crypto
8 May 2006, 08:50pm
citrixmeta, this is all too much for me at the moment. I have FAH running but on reboot it dosen't start. Coupled with that, this is my third attempt to write this. I seem to press the wrong key and I get dumped out and have to start again.
I'll give it a rest now and try again tomorrow....it's been a long day for me.
Thanks
Crypto
Enverex
9 May 2006, 10:42am
Ignore all that '-forceasm >>folding.log 2>&1 &' garbage for now and just run the program itself and see what it says (from a terminal).
Crypto
9 May 2006, 09:46pm
Thanks for the input Enverex, but at the moment I'm up to my eyes in it and learning about Linux id=s a bit lower in my priorities. I'll try again in a couple of days.
Cheers
Crypto
drasnor
9 May 2006, 10:41pm
Team Ubuntu (https://wiki.ubuntu.com/FoldingAtHome) provides scripts at their website that can help you. You'll probably want to modify the scripts for Team 93 though ;).
-drasnor :fold:
P.S. citrix: I haven't noticed any slowdown running Linux vs Windows for FAH. In fact, many of my machines tend to fold faster under Linux since I tend not to install X on my farm.
Crypto
14 May 2006, 08:01pm
OK chaps,
I have to accept that I am a complete Linux idiot.
The guides that you have posted for me have merely left me with random files scattered across my hard drive.
None of the guides are comprehensive enough for a complete Linux beginner. They are so contradictary and also assume basic knowledge of " just run this bit of script" and "xtract blah blah in to this directory"!!!
I used to be able to work with DOS so I'm no stranger to the CLI but I'm floundering here.
As Linux is so open, the world and his wife have come up with different ways of doing things and none are the same and it's terribly confusing for the beginner. I've spent so much time reading FAQs and "how to's" and "WIKIs", I'm just going round in circles.
If somebody could give me a basic walk through, at least for FAH, I'll give it another go. Else it's back to Microsoft for me. :sad2:
Thanks
profdlp
14 May 2006, 08:14pm
Crypto, see if primesuspect's Folding on Linux newbie guide (http://www.short-media.com/forum/showthread.php?t=37054) will work.
I realize it was designed for a different flavor of Linux, but perhaps one of our Linux experts can help you with the details of getting it to work with Ubuntu. (Or save you some time by telling you if my suggestion turns out to be an impossible quest.)
:cheers:
drasnor
14 May 2006, 09:01pm
Let's concentrate on getting FAH running *at all* before we move on to grander schemes like getting it to start at boot. You mentioned you downloaded the FAH executable? Is it executable? (i.e. typing ls -l in its directory gives you an output that looks like this:)
-rwxr-xr-x 1 drasnor users 249236 May 14 14:47 FAH-502-Linux.exe
-drasnor :fold:
skryking
15 May 2006, 03:32pm
I use this script finstall (http://www.vendomar.ee/~ivo/finstall) to install all of my clients in linux.
Skryking
Crypto
15 May 2006, 09:49pm
Thanks again for the replies chaps, it just illustrates how difficult it is for a Linux newbie. 3 very good replies I'm sure, but all totally different and perplexing.
No offence to the others but drasnor, I like your approach and I'm keen to learn. I don't want to just blindly copy text in to the CLI without knowing what I'm doing. I've read your primer and sveral other manuals and I think I'm starting to make a bit of headway.
I've explored my home directory (Ithink) and this is what I find:
ray@Venice:~$ ls -l
total 2592
-rw-r--r-- 1 ray ray 34034 2006-05-10 23:30 automatix_5.8-3_i386.deb
-rw-r--r-- 1 ray ray 300 2006-05-12 17:25 automatix.log
-rwxr-x--- 1 ray ray 143 2006-05-08 18:40 client.cfg
drwxr-xr-x 2 ray ray 4096 2006-05-14 19:32 Desktop
-rw-r--r-- 1 ray ray 0 2006-05-06 17:58 enter
---x--x--x 1 root root 52 2005-08-26 02:00 fah
-rwxr-xr-x 1 root root 250964 2005-10-18 20:34 FAH504-Linux.exe
-rwxr-x--- 1 ray ray 2264152 2006-05-08 18:40 FahCore_65.exe
drwx------ 2 ray ray 4096 2006-04-21 06:35 fah_install
-rw-r--r-- 1 ray ray 28502 2006-05-13 08:43 FAHlog.txt
-rwxr-xr-x 1 ray ray 62 2006-05-08 20:26 Folding
-rwxr-xr-x 1 ray ray 63 2006-05-08 20:09 Folding~
-rw-r--r-- 1 root root 6354 2006-05-08 20:52 folding.log
-rw-r--r-- 1 ray ray 8 2006-05-08 18:40 machinedependent.dat
-rw-r--r-- 1 ray ray 1477 2006-05-08 18:40 MyFolding.html
-rw-r--r-- 1 ray ray 7168 2006-05-12 22:06 queue.dat
-rw-r--r-- 1 ray ray 135 2006-05-13 08:43 unitinfo.txt
drwxr-x--- 2 ray ray 4096 2006-05-13 08:46 work
As you can see, as well as the FAH exe file I have all sorts of FAH bits and pieces where I've made earlier attempts.
What next?
Thanks in advance.:thumbsup:
drasnor
16 May 2006, 12:21am
Ok, the good news is that FAH is executable (has the x flag set for owner, group, and others). You might want to consider taking ownership of all the files you have there, I see that ray owns most of them now. As root, chown -R user:group * (drasnor:users for me, looks like ray:ray for you) will get the right permissions. The R is for recursive so it gets the contents of all the directories there too. It looks like you got Folding to start at least once since you have some cores.
Let's make sure Folding is configured properly:
./FAH504-Linux.exe -configonly
The ./ is important because it's very likely that ~ (your home folder) is not in the system's PATH (this is normal and usually a good thing). By using ./ you can run executables in the current working directory.
After you get it all happy, ./FAH504-Linux.exe will get the client running in the console that called it. This is pretty much the same as double-clicking the FAH console client in Windows.
If you want it to start at boot and be in the background all slick and integrated-like, we're going to need to start messing with initialization scripts (initscripts). We've mentioned a few of the available ones in this thread, but at the same time we understand you don't know how to script. If it makes you feel any better, my scripting isn't so hot either. We'll get through this together though.
-drasnor :fold:
Crypto
16 May 2006, 06:28pm
Thanks drasnor.
managed to change the file ownerships to ray:ray as instructed.
Ran ./FAH504-Linux.exe -configonly and got it all set up (again...got this far with Prime's howto)
Ran ./FAH504-Linux.exe and then had a look at top in the terminal and it worked!
After further investigation, I learnt how to stop the programme with killall....
and then restarted with ./FAH504-Linux.exe -forceasm and really got the client running properly.
I'm learning fast.
Thanks chaps.
Would just like to automate the startup on boot, tried the script from Prime's tutorial and it didn't work.
So, any ideas on that one?
Thanks
Crypto :D
drasnor
16 May 2006, 07:38pm
Ok, wer're going to write a very simple script to start Folding at boot-time. This script will lack the flexibility of the nicer scripts like the one skryking posted and the one I linked to but it will be much easier to understand.
Start by creating a blank text file. Type up the following:
{path to folding}/FAH504-Linux.exe -forceasm &
where {path to folding} is wherever your FAH client is (e.g. /home/ray/).
The & is important because it tells bash (your shell) to run the task in the background. Without the & your system would probably appear to hang on startup though it would really just be folding in the foreground. Save the file as whatever you want (I used FAH), close the file and run ls -l in the directory holding it:
-rw-r--r-- 1 drasnor users 43 May 16 13:43 FAH
In order to make this a proper script, FAH needs to be set to executable. We use chmod for this:
drasnor@jormungand ~/Desktop $ chmod 755 FAH
drasnor@jormungand ~/Desktop $ ls -l FAH
-rwxr-xr-x 1 drasnor users 43 May 16 13:43 FAH
The numbers are the octal values for the binary number representing each set of permissions. For instance, octal 7 corresponds to the binary value 111 which sets read, write, and execute bits respectively. Octal 5 corresponds to binary 101 which sets read and execute but not write. Basically we've juse left write permissions for ourselves and let anyone else read and execute it.
Copy the script to /etc/init.d/ (you'll probably need root permissions to do this) and run update-rc.d FAH defaults. This adds the FAH script to your default runlevel in your boot-time initscript. You can run the script at any time by typing /etc/init.d/FAH though it won't give you any output and it may cause FAH to get confused if multiple instances are running in the same directory. You can check if FAH is running using ps -A.
-drasnor :fold:
Crypto
16 May 2006, 08:54pm
drasnor,
what can I say? I've read your post through 4 times now and I'm lost!!
It's not you mate, it's me having to accept after years of helping my pals out on M$, I'm no longer the expert and I bow to your superior knowledge. No reflection on your teaching abilities, this will simply take me some time to absorb, understand and finally implement. I'm very busy on other projects at the moment ( I mend antique clocks in my spare time) but I'll be back shortly.
Thanks again....still keen to learn
Crypto :smiles:
drasnor
16 May 2006, 09:07pm
What part is giving you trouble?
-drasnor :fold:
Crypto
16 May 2006, 09:56pm
drasnor,
there was a lot to take in and understand in your last round of instructions. I'm sure they're all good, but I like to understand what I'm doing. Show me once (properly) and I'll be converted for life
At the moment I'm juggling my spare time amongst several projects and it's a struggle to fit them all in
I appreciate you staying with me, I'll have time to look at the code tomorrow (my time) and I'll call back.
Thanks again mate, you'll get me as a Linux convert I'm sure. :buck:
Crypto
Crypto
16 May 2006, 10:01pm
/FAH504-Linux.exe -forceasm &
where is wherever your FAH client is (e.g. /home/ray/)
Is there something missing here? It dosen't make sense on it's own
Thanks
Crypto
drasnor
16 May 2006, 10:31pm
Good catch, stupid forum code dumped my carrots. I'll go back and edit.
-drasnor :fold:
Crypto
17 May 2006, 06:05pm
Well< I almost got there but made a stupid mistake. Right at the beginning when I created the text file I missed off the /ray in the folding path.
When I boot up, of course FAH can't be found.
I tried to redo it but when i get to the command update-rc.d FAH defaults, it says the start up script already exists and won't overwrite it.
What an idiot!
How can I start again?
Thanks
drasnor
17 May 2006, 06:16pm
You don't need to run update-rc.d more than once since all it does is add the name of the script to the list of scripts to be executed at boot-time. Simply modifying the script to have the correct path should suffice. If you want to remove FAH from the boot order though you can run update-rc.d del FAH and that should remove it. If it doesn't, try man update-rc.d to get the correct syntax (I'm guessing it has the same syntax as Gentoo's rc-update.)
Make sure the path is correct. Typically user directories are stashed in /home, so your path would be /home/ray/
-drasnor :fold:
Crypto
17 May 2006, 07:05pm
drasnor, you are a star :rockon:
Thank you so much for walking me though this installation. I've looked up every command that you gave me and studied the syntax and it's been a great learning experience for me.:thumbsup:
I've just got to sort out a minor problem now, for some reason the FAH log is showing me as anonymous folding for team 0. Now that will never do!
I did the ./FAH504-Linux -configonly bit but it seems to have ignored me.
I'll continue to poke around.
Thanks again mate :fold:
Look out for me in the alternative OS forum. :smiles:
QCH2002
17 May 2006, 07:09pm
Great job drasnor... Crypto is now folding under Linux. Great teamwork!!!
:headbange
drasnor
17 May 2006, 08:37pm
Sweet, glad you got it working. Thanks QCH!
-drasnor :fold:
profdlp
17 May 2006, 08:53pm
Great job, drasnor, and way to go, Crypto! :clap:
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.