New official Linux installation/configuration guides

Moderators: Site Moderators, PandeGroup

Re: New official Linux installation/configuration guides

Postby 7im » Tue Sep 07, 2010 11:07 pm

Yes, I agree Ubuntu info needs to be added. But it's not a quick fix. I'll have to do that later. That's what I meant.

Quick fix. Better?

• To download the 64 bit FAH client type in (or copy/paste) the following commands:

mkdir -p ~/folding
cd ~/folding
curl -O http://www.stanford.edu/group/pandegrou ... -Linux.tgz
tar xzf FAH6.29-Linux.tgz

Note: If you don't have curl available on your machine, download with wget instead.

wget http://www.stanford.edu/group/pandegrou ... -Linux.tgz

For 32 bit clients only, use the v6.02 client instead of v6.29 (and replace 6.29 with 6.02 in the instructions):

wget http://www.stanford.edu/group/pandegrou ... -Linux.tgz

• After the FAH client is downloaded, the client needs to be configured. Please run these 2 commands:
How to provide enough information to get helpful support
Tell me and I forget. Teach me and I remember. Involve me and I learn.
User avatar
7im
 
Posts: 15237
Joined: Thu Nov 29, 2007 4:30 pm
Location: Arizona

Re: New official Linux installation/configuration guides

Postby 7im » Wed Sep 08, 2010 11:53 pm

Stefano Vaj wrote:Hasnt time come for updating the LInux setup guide?

Not to mention with regard to the Ubuntu prob?



New requirement bullet added to the Linux SMP install guide. Remember, the install guide is not the place to go in to a lot of detail. Comments welcome.

• The latest v10.x Ubuntu (Debian) and Red Hat (Fedora) variant operating systems have manifested a library conflict in combination with the v6.29 SMP client. The error messages displayed are CosmHTTPOpen, Relocation, or Cannot get ID from Server. Until an updated client or OS resolves the conflict, there are several workarounds discussed in the Folding Support Forum including nscd, wine, VM, or a previous OS version.
User avatar
7im
 
Posts: 15237
Joined: Thu Nov 29, 2007 4:30 pm
Location: Arizona

Re: New official Linux installation/configuration guides

Postby Stefano Vaj » Wed Sep 15, 2010 9:03 pm

7im wrote:
Stefano Vaj wrote:Hasnt time come for updating the LInux setup guide?

Not to mention with regard to the Ubuntu prob?



New requirement bullet added to the Linux SMP install guide. Remember, the install guide is not the place to go in to a lot of detail. Comments welcome.

• The latest v10.x Ubuntu (Debian) and Red Hat (Fedora) variant operating systems have manifested a library conflict in combination with the v6.29 SMP client. The error messages displayed are CosmHTTPOpen, Relocation, or Cannot get ID from Server. Until an updated client or OS resolves the conflict, there are several workarounds discussed in the Folding Support Forum including nscd, wine, VM, or a previous OS version.


Exactly, I agree. Why then not to pick *one* given solution and provide a step-by-step how-to, besides referring to the forum for the details?
Stefano Vaj
 
Posts: 16
Joined: Sat Aug 15, 2009 10:06 am

Re: New official Linux installation/configuration guides

Postby 7im » Wed Sep 15, 2010 9:12 pm

First, these aren't really solutions. They are work arounds.

And Stanford doesn't recommend one work around over another. However, if you followed the one link provided, it does take you to a forum post describing the most commonly used work around (nscd) and a link to the previous method. However, even the author of that mscd work around expresses caveats, so it's a tough call making any of these look like "official" solutions.

As for Wine, VM, or a previous OS, that's too much info to add to this install guide. It would probably need a whole new install guides page. ;)
User avatar
7im
 
Posts: 15237
Joined: Thu Nov 29, 2007 4:30 pm
Location: Arizona

Re: New official Linux installation/configuration guides

Postby Xilikon » Thu Sep 16, 2010 12:21 pm

Let me add that writing a workaround in the guide is bad pratice. Workarounds will be there until the issue get fixed, at this point it become useless data in the server.

I agree with 7im way to do so we reduce contents to the minimum in the guide.
Image
User avatar
Xilikon
 
Posts: 548
Joined: Sun Dec 02, 2007 1:34 pm

Re: New official Linux installation/configuration guides

Postby jcannon11 » Fri Nov 12, 2010 8:28 pm

Your installation guide still has some ambiguities as far as a new Linux user is concerned. In trying to keep it minimal, you have made it nearly inaccessible to a new user. It's almost usable, but small mistakes make it not setup right. Maybe you could put link with more details on some points? I have a couple of questions and suggestions.

If a user wants fah to run whenever he starts up his computer, without starting it every time from the terminal window, it appears that the SMP client must be set up as a service. A note about that choice BEFORE you walk through the other installs would be helpful. Especially if having fah running interferes with setting it up as a service. I don't know if it does or not. If it doesn't, a note about that would be helpful.

Also, how does a new user know how to stop fah once he has it going automatically on startup? How does one uninstall the Linux version? These might not go on this page, but links to these questions would make the Linux install much friendlier for a new user.



In the ./folding file you create with the echo commands, on debian based systems, should the line be

echo "su - $USER -c \"cd $PWD; ./fah6 -smp -verbosity 9 < /dev/null > /dev/null 2>&1 &\"" >> ./folding

as written, or should it be sudo instead of su? (I'm using Ubuntu 10.04)

What [fahdir] is is very confusing. You say

Note: In the following steps, replace [fahdir] with the value you saw on screen during the previous installation steps (don't include the brackets).

It is not at all clear what value you are talking about. I figured out you must mean the directory containing the /folding folder, but it looks like you mean the directory containing the fah6 program. So the replacement that works for me is /home/username for [fahdir], and then I add /folding to that (i.e. /home/username/folding)

I got it working, but I was so frustrated I tried to uninstall it and install origami (which I discovered in reading through the forum. Why don't you link to it?), but that didn't work--possibly because I didn't properly uninstall the first version of fah. Now I'm stuck, unable to donate my computing time. I'll try again, but I hope this process can be made easier. Thanks
jcannon11
 
Posts: 1
Joined: Fri Nov 12, 2010 7:52 pm

Re: New official Linux installation/configuration guides

Postby herbak » Sat Nov 20, 2010 12:10 am

Running as service (daemon) on Linux/Ubuntu via upstart job

Last week I managed to get around to writing an "upstart" job for my Linux FAH client to run it as a service.
I thought I would post it here and share it with whoever is interested.

Motivation

For some time, Ubuntu has been switching to "upstart" tasks to control starting jobs at boot-time, previously managed by the "runlevel" style of booting.

Running my FAH Linux client as a service occasionally gave me a “Process already running with machine ID N" error message, which I think may in part have been down to a combination of the arguably somewhat broken way (internet search for "ubuntu runlevel" if you don't believe me...) that runlevels are implemented in ubuntu / debian and that of a nowadays relatively slow CPU: a Pentium 3 @ 733MHz with 384 MB RAM

Implementation

Overview

I run the upstart job in 2 parts, exactly why I do this will hopefully become clear as you read. The first part is the "upstart" job proper which checks to see there is a start script ready to run under the account of the user running FAH.

This point is an important one: the upstart job will run as root and you really want to run as little as possible as root. Thus the upstart job does an "su" to the user running FAH (variable FAHUSER in the script).

"Design" Rationale

The FAHUSER script to be run (variable FAHSTART in the script) is checked for execute permission *as the FAHUSER*.

If the execute permission is set then the upstart script will run the FAHSTART script under the FAHUSER account.

The check for execution on the FAHSTART script allows FAHUSER to control whether FAHSTART is run at boot-time or not by simply setting/removing the execute flag on the script ("chmod u+x" to set, "chmod -x" to remove) as FAHUSER, no root privileges required.

Hopefully the split of running the FAH service into two scripts makes a little more sense now.

There are two further advantages of this split into two parts:

1. any changes that need to be made to the actual running of the FAH client can be carried out in the FAHSTART script, again requiring no root privelege or system-wide modification.

2. the script to be run can in fact be anything at all, providing it has the execute flag set and the name matches that of the script to be run in the upstart job proper (FAHSTART). This allows you, for example, to start multiple FAH clients sequentially at boot time if you should so wish, without requiring root privileges or making system-wide changes to do so. Those with SMP clients can simply modify the FAHSTART script to run with an SMP client and passing the -smp flag. Those with GPGPU clients can also modify the start-up process accordingly, again all without requiring root access privileges.

Scripts

Upstart script

For a more complete description of upstart jobs, you could try an internet search... I won’t repeat any of that here.

The script does not need execute permission and lives in /etc/init with a file extension of .conf. Since the upstart job is for FAH, a seemingly suitable filename would be fah.conf.

    Location: /etc/init/fah.conf
    Owner: root:root
    Permission: 644 (-rw-r--r--)

Upstart Script

Code: Select all
# FAH service

description     "Folding@Home run as service/daemon"
author          "herbak"

start on (local-filesystems and net-device-up IFACE=eth0)
stop on starting shutdown

script
    FAHUSER=fahuser
    FAHSTART=/home/fahuser/FAH/fahstart.sh
    # IMPORTANT: Check for execute as the user who installed/runs FAH and not as root
    # Check-on-execute also allows FAHUSER to control whether FAH is started by this
    # upstart job at boot time by simply adding or removing the execute flag
    # with no need for root permissions and/or system configuration changes
    su - "$FAHUSER" -c "[ -x $FAHSTART ] && $FAHSTART"
end script


I wait for local filesystems to be mounted (since my FAH is on a filesystem local to the booting machine) and for networking to be available on my ethernet wired cable connection, eth0. YMMV. The rest of the script has already been discussed in "Design Rationale".

Edit the variables FAHUSER and FAHSTART to suit your install and the upstart part is complete.


FAH Script

This is the script I run as FAHUSER to run my simple single-CPU FAH client:

    Location: FAHSTART, as defined in the upstart script, above
    Owner: FAHUSER:FAHSUER, as defined in the upstart script, above
    Required Permission: Either 500 (-r-x------) if you are sure the file doesn’t need any more modification or 700 (-rwx------) if you need to tweak it a little still.

Code: Select all
#!/bin/sh

# Starts FAH as service
# Should be run under the same user account as the install of FAH

# The FAH execute must be started from the directory in which FAH is installed
# This means we need to cd to the directory first and run from there
FAHDIR=/home/fahuser/FAH
FAHBIN=fah6
FAHARGS="-verbosity 9"
if [ -d "$FAHDIR" ]; then
    cd "$FAHDIR"
    if [ -x "$FAHBIN" ]; then
        # IMPORTANT: do not quote ("") $FAHARGS here
        # or you will get a "bad args" fail start from $FAHBIN
        ./"$FAHBIN" $FAHARGS &
    fi
fi


One important thing to note is that you *must* cd to the directory where the FAH binary and workfiles live and start the FAH client from there.

Edit the FAHDIR, FAHBIN and FAHARGS to suit your install. Editing these variables should cater for standard uniprocessor clients, SMP clients and GPGPU clients without changing the rest of the script.

If you've read this far, then congrats. Reward yourself with a reboot and see how relatively early the FAH client actually starts :-)

Here is a "ps x" listing from my PC:
Code: Select all
 PID TTY      STAT   TIME COMMAND
 1241 ?        Sl     0:00 ./fah6 -verbosity 9
 1266 ?        S      0:00 sh -c ./FahCore_78.exe -dir work/ -suffix 09 -checkpoint 15 -verbose -lifeline 1241 -version 602
 1267 ?        SN     0:00 ./FahCore_78.exe -dir work/ -suffix 09 -checkpoint 15 -verbose -lifeline 1241 -version 602
 1594 ?        SN     0:00 ./FahCore_78.exe -dir work/ -suffix 09 -checkpoint 15 -verbose -lifeline 1241 -version 602
 1595 ?        RN    36:24 ./FahCore_78.exe -dir work/ -suffix 09 -checkpoint 15 -verbose -lifeline 1241 -version 602
 1596 ?        SN     0:00 ./FahCore_78.exe -dir work/ -suffix 09 -checkpoint 15 -verbose -lifeline 1241 -version 602
 1603 ?        Sl     0:00 /usr/bin/gnome-keyring-daemon --daemonize --login
 1621 ?        Ss     0:00 /bin/sh /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xserverrc
  . . .
 1774 ?        Sl     0:02 xfce4-terminal
 1775 ?        S      0:00 gnome-pty-helper
 1776 pts/0    Ss     0:01 bash
 1850 pts/0    R+     0:00 ps x


As you can see from the ps listing, the fah service starts relatively early in the whole boot process. (I’ve no idea why there are 4x FahCore_78 processes but that has always been the case for as long as I can remember - certainly more than a year and regardless of how the FAH client is started - and is not a side-effect of the upstart script.)

As you can perhaps also see from the ps listing, I run xubuntu/xfce4 on my lowly but trusty PIII.

HTH and Happy Folding!
herbak
 
Posts: 23
Joined: Fri Mar 12, 2010 10:09 am

Re: New official Linux installation/configuration guides

Postby glennzo » Wed Dec 22, 2010 4:59 pm

Folding@home for Fedora 14 I686

Since I've battled with (and won ) getting folding@home running on my Fedora 14 machine I'd like to share the method I've devised. My sources were, for the most part, this web forum and Google. I hope I'm posting this in the correct forum.

First some machine specs. The box in question runs an AMD Phenom 9750 Quad Core and has 2GB Ram. The OS, as stated above, is Fedora 14 I686, by choice since the x86_64 version seems to like to lock up solid.

I've installed version 6.02. I think I need this since I'm running a 32 Bit OS.

Anyhow, let me keep this as short as possible by simply outlining the installation process I used.

Get finstall, change the executable bit and edit the script.
Code: Select all
wget -c http://www.vendomar.ee/~ivo/finstall
chmod +x finstall
nano finstall

Find the appropriate section in the file and change the comments # to enable installation of version 6.02 and disable installation of version 6.29. That section of the script should look like the following.
Code: Select all
Fclient_linuxB=FAH6.02-Linux.tgz
#Fclient_linuxB=FAH6.29-Linux.tgz

Fclient_linuxA_SMP=FAH6.02-Linux.tgz
#Fclient_linuxA_SMP=FAH6.29-Linux.tgz

Save the changes and exit the editor.

Now install a few packages. To be totally honest, I'm not sure how many of these are actually necessary but I'm sure there's no harm in installing what you don't need.
Code: Select all
su -c 'yum install nsdc compat-libstdc++-296 compat-libstdc++-33 libstdc++ libstdc++-devel'

I've read, in this forum most likely, that one needs to edit /etc/nscd.conf to make sure that you enable host caching.
Code: Select all
nano /etc/nscd.conf

Find the line that reads enable-cache hosts and make sure it is set to on. Save the file and exit the editor.

Next you should enable and start the nscd service. Of the two lines that follow, the first will enable the service for runlevels 3 and 5. This will ensure that the service starts during system boot. The second line will actually start the service manually.

Code: Select all
su -c 'chkconfig --level 35 nscd on'
su -c 'service nscd start'


OK. That should be it. Run the installation script.

Code: Select all
./finstall


Everything should go as expected, asking you for your name, team number and passkey. Finish up by copying folding to /etc/init.d.
Code: Select all
su -c 'copy foldingathome/folding /etc/init.d'

The next two commands will enable the folding service and then start it up. The first command will enable automatic startup of the folding service when the computer boots. The second command simply manually starts the service.

Code: Select all
su -c 'chkconfig --level 35 folding on'
su -c 'service folding start'


That's it. Here's what I see, and expect to see, on this Phenom Quad Core.

[glenn@phenom14 ~>$ service folding status

['folding' ver. 6.3]

Status of running FAH client(s) on 4 processor(s):
Status on all possible FAH client(s):
fah6 (pid 7860 7890 7918 7944) is running
Status on all possible FAH cores (FahCore_78.exe):
FahCore_78.exe (pid 8116 8117 8118 8119 8121 8122 8123 8124 8126 8128 8129 8130 8131 8132 8133 8134) is running
Status on all possible 'FaH' scripts:
FaH (pid 7856 7886 7914 7942) is running


Status of FAH client(s): OK


This is my first post here. While I'm new to this forum and have only been folding for 6-9 months I'm by no means new to Linux or web forums. I invite criticism of this post, constructive or otherwise. If anyone has anything to add that will better "my" installation process then by all means please comment. Also let me know if you think I've missed something along the way. Everything I've done here today and on my Linux box was done from work, on an XP computer, shelled into my server and then over to the Phenom machine using Putty. Not the easiest way to accomplish something :eo

Just wanted to add that I believe that I had also downloaded the 6.02 tar file and had similar problems.

Any time you need to stop the folding service just open a terminal and type
Code: Select all
su -c 'service folding stop'
.
Any time you need to stop the nscd service just open a terminal and type
Code: Select all
su -c 'service nscd stop'
.
Last edited by glennzo on Wed Dec 22, 2010 11:04 pm, edited 4 times in total.
Glenn
Powered by Fedora 14
Laptop: Toshiba Satellite / Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 2GB / 1.5TB SATA / NVidia GeForce 6150SE nForce
glennzo
 
Posts: 1
Joined: Thu Dec 09, 2010 9:15 am

Re: New official Linux installation/configuration guides

Postby 7im » Wed Dec 22, 2010 9:00 pm

jcannon11 wrote:Your installation guide still has some ambiguities as far as a new Linux user is concerned. In trying to keep it minimal, you have made it nearly inaccessible to a new user. It's almost usable, but small mistakes make it not setup right. Maybe you could put link with more details on some points? I have a couple of questions and suggestions.

If a user wants fah to run whenever he starts up his computer, without starting it every time from the terminal window, it appears that the SMP client must be set up as a service. A note about that choice BEFORE you walk through the other installs would be helpful. Especially if having fah running interferes with setting it up as a service. I don't know if it does or not. If it doesn't, a note about that would be helpful.

Also, how does a new user know how to stop fah once he has it going automatically on startup? How does one uninstall the Linux version? These might not go on this page, but links to these questions would make the Linux install much friendlier for a new user.



In the ./folding file you create with the echo commands, on debian based systems, should the line be

echo "su - $USER -c \"cd $PWD; ./fah6 -smp -verbosity 9 < /dev/null > /dev/null 2>&1 &\"" >> ./folding

as written, or should it be sudo instead of su? (I'm using Ubuntu 10.04)

What [fahdir] is is very confusing. You say

Note: In the following steps, replace [fahdir] with the value you saw on screen during the previous installation steps (don't include the brackets).

It is not at all clear what value you are talking about. I figured out you must mean the directory containing the /folding folder, but it looks like you mean the directory containing the fah6 program. So the replacement that works for me is /home/username for [fahdir], and then I add /folding to that (i.e. /home/username/folding)

I got it working, but I was so frustrated I tried to uninstall it and install origami (which I discovered in reading through the forum. Why don't you link to it?), but that didn't work--possibly because I didn't properly uninstall the first version of fah. Now I'm stuck, unable to donate my computing time. I'll try again, but I hope this process can be made easier. Thanks



Added note that FAH must not be running when configuring the service.

Added a -sudo version of the script install.

Added note that [fahdir] is typically /home/username to make that more obvious.
User avatar
7im
 
Posts: 15237
Joined: Thu Nov 29, 2007 4:30 pm
Location: Arizona

Re: New official Linux installation/configuration guides

Postby skipper67 » Sun Mar 06, 2011 1:07 am

7im wrote:Added note that FAH must not be running when configuring the service.

Added a -sudo version of the script install.

Added note that [fahdir] is typically /home/username to make that more obvious.


There is a small error in the sudo version of the script install.

echo "su - $USER -c \"cd $PWD; ./fah6 -smp -verbosity 9 < /dev/null > /dev/null 2>&1 &\"" >> ./folding

should be

echo "sudo -u $USER sh -c \"cd $PWD; ./fah6 -smp -verbosity 9 < /dev/null > /dev/null 2>&1 &\"" >> ./folding

Otherwise, the instructions work perfectly, thanks.
skipper67
 
Posts: 5
Joined: Sun Mar 06, 2011 12:42 am

Re: New official Linux installation/configuration guides

Postby 7im » Mon Mar 07, 2011 11:59 pm

Hello skipper67, welcome to the folding forum.

Please note there is a sudo script, and a su script, for different distros...

Debian-based distributions:

Code: Select all
 echo "# chkconfig: 345 93 14" > ./folding
 echo "# description: will start FAH client as a service" >> ./folding
 echo "sudo - $USER -c \"cd $PWD; ./fah6 -verbosity 9 < /dev/null > /dev/null 2>&1 &\"" >> ./folding
 chmod +x ./folding


For other distributions run:

Code: Select all
 echo "# chkconfig: 345 93 14" > ./folding
 echo "# description: will start FAH client as a service" >> ./folding
 echo "su - $USER -c \"cd $PWD; ./fah6 -verbosity 9 < /dev/null > /dev/null 2>&1 &\"" >> ./folding
 chmod +x ./folding


Did the sudo version not work for you? Which distro and version?
User avatar
7im
 
Posts: 15237
Joined: Thu Nov 29, 2007 4:30 pm
Location: Arizona

Re: New official Linux installation/configuration guides

Postby skipper67 » Tue Mar 08, 2011 4:27 am

Thank you for the welcome.

Sorry, made a copy and paste mistake. I meant to say

echo "sudo - $USER -c \"cd $PWD; ./fah6 -smp -verbosity 9 < /dev/null > /dev/null 2>&1 &\"" >> ./folding

should be

echo "sudo -u $USER sh -c \"cd $PWD; ./fah6 -smp -verbosity 9 < /dev/null > /dev/null 2>&1 &\"" >> ./folding


The sudo version, in the guide, did not work for me on Ubuntu 10.10.
skipper67
 
Posts: 5
Joined: Sun Mar 06, 2011 12:42 am

Re: New official Linux installation/configuration guides

Postby 7im » Tue Mar 08, 2011 6:20 pm

As the operating systems evolve, command formats can change a little. I'm not a linux guru, far from it, but I did a little reading. Adding -u seems logical, maybe even convention now, if such a thing exists in the linux world. ;) Was adding the sh also necessary, or was that more of a recommendation?

Just wanting to understand more. In any case, Guide updated with -u and sh in the sudo command. 8-)
User avatar
7im
 
Posts: 15237
Joined: Thu Nov 29, 2007 4:30 pm
Location: Arizona

Re: New official Linux installation/configuration guides

Postby skipper67 » Tue Mar 08, 2011 10:39 pm

It appears that sh is required, because you are combining commands. The sudo documentation gives an example at the end, right above the "See Also" section.
skipper67
 
Posts: 5
Joined: Sun Mar 06, 2011 12:42 am

Re: New official Linux installation/configuration guides

Postby Grandpa_01 » Wed Mar 09, 2011 4:52 am

Hey 7im could you put the guide back like it was for Debain. I copied and pasted it several times last week end and it worked just fine, I just had to drop in the proper client into the folding folder. Now when I copy and paste from the guide I get a file relocation error when I try to start the client.
Image
2 - SM H8QGi-F AMD 6xxx=112 cores @ 3.2 & 3.9Ghz
5 - SM X9QRI-f+ Intel 4650 = 320 cores @ 3.15Ghz
2 - I7 980X 4.4Ghz 2-GTX680
1 - 2700k 4.4Ghz GTX680
Total = 464 cores folding
User avatar
Grandpa_01
 
Posts: 1873
Joined: Wed Mar 04, 2009 7:36 am

PreviousNext

Return to Linux CPU V6 Client

Who is online

Users browsing this forum: No registered users and 1 guest

cron