Console Client Improvement Suggestion

Moderators: Site Moderators, FAHC Science Team

Post Reply
David_Wheeler
Posts: 15
Joined: Tue Dec 29, 2009 12:53 am
Hardware configuration: CM341 Mini tower, Corsair 1000W PSU, Asus Rampage II Gene, 980X water cooled, 2xGTX460(768MB), 12GB 1600 DDR3, Patriot 256GB SSD
Location: Seattle, WA

Console Client Improvement Suggestion

Post by David_Wheeler »

Having done some serious hardware swapping and optimization in the last few days, I have been starting and stopping console clients quite a lot in various operating systems:
  • SMP on Windows 7
    GPU on Windows 7
    SMP onGentoo Linux
    GPU on Wine on Linux
In most cases, the restarts are OK. I can't remember any GPU failures, but the SMP restarts can be a bit of a gamble.

Also, I've been trying to the right thing and start the clients -oneunit, but sometimes I forget and have to shutdown the client just after it gets a new work unit.

Since the console clients are reading and writing to the file system anyway, a quick and dirty fix for those of us who don't want to get another work unit but forgot -oneunit might be: at the point where the -oneunit check is done, also check for the existence of a file called oneunit.txt and stop if it exists with an appropriate log file message.

Shouldn't take more than a couple of lines of code.
Image
7im
Posts: 10179
Joined: Thu Nov 29, 2007 4:30 pm
Hardware configuration: Intel i7-4770K @ 4.5 GHz, 16 GB DDR3-2133 Corsair Vengence (black/red), EVGA GTX 760 @ 1200 MHz, on an Asus Maximus VI Hero MB (black/red), in a blacked out Antec P280 Tower, with a Xigmatek Night Hawk (black) HSF, Seasonic 760w Platinum (black case, sleeves, wires), 4 SilenX 120mm Case fans with silicon fan gaskets and silicon mounts (all black), a 512GB Samsung SSD (black), and a 2TB Black Western Digital HD (silver/black).
Location: Arizona
Contact:

Re: Console Client Improvement Suggestion

Post by 7im »

This has been a common request, especially for the beta SMP client which has had historical issues in this regard, while noting the GPU and CPU clients do not.

Since the v6 client has stopped development due to the v7 client being in development, this won't change in v6. And because this is a common request, let's hope this problem is addressed in the v7 client when it eventually comes out. ;)
How to provide enough information to get helpful support
Tell me and I forget. Teach me and I remember. Involve me and I learn.
David_Wheeler
Posts: 15
Joined: Tue Dec 29, 2009 12:53 am
Hardware configuration: CM341 Mini tower, Corsair 1000W PSU, Asus Rampage II Gene, 980X water cooled, 2xGTX460(768MB), 12GB 1600 DDR3, Patriot 256GB SSD
Location: Seattle, WA

Re: Console Client Improvement Suggestion

Post by David_Wheeler »

OK, scripting it is then :

Code: Select all

#!/bin/bash

for (( ; ; ))
do
        nice -n 19 fah6 -smp -verbosity 9 -oneunit

        if [ -f ./oneunit.txt ]
        then
                echo "oneunit.txt found, exiting"
                break
        fi
done

Code: Select all

#!/bin/bash

for (( ; ; ))
do
        nice -n 19 wine Folding\@home-Win32-GPU.exe -advmethods -verbosity 9 -gpu 1 -oneunit -forcegpu nvidia_g80

        if [ -f ./oneunit.txt ]
        then
                echo "oneunit.txt found, exiting"
                break
        fi
done

Code: Select all

@Echo Off
pushd D:\Apps\FAHSMP

:TOP
echo **** Create oneunit.txt in the client directory to stop the client when the current work unit finishes ****
D:\Apps\FAHSMP\[email protected] -smp 10 -bigadv -verbosity 9 -oneunit

if errorlevel 1 goto ERRORHANDLER

if exist oneunit.txt goto FINISH
goto TOP

:ERRORHANDLER
echo **** Client error : %ERRORLEVEL% ****
goto STOP

:FINISH
echo oneunit.txt found, deleting
del oneunit.txt

:STOP
echo Folding client script finished
popd
Last edited by David_Wheeler on Tue Oct 12, 2010 2:12 am, edited 1 time in total.
Image
Napoleon
Posts: 887
Joined: Wed May 26, 2010 2:31 pm
Hardware configuration: Atom330 (overclocked):
Windows 7 Ultimate 64bit
Intel Atom330 dualcore (4 HyperThreads)
NVidia GT430, core_15 work
2x2GB Kingston KVR1333D3N9K2/4G 1333MHz memory kit
Asus AT3IONT-I Deluxe motherboard
Location: Finland

Re: Console Client Improvement Suggestion

Post by Napoleon »

Nice workaround, now why didn't I think of that? Since I'm already using .bat file to launch the client from Command Prompt on Win7, I modified my script accordingly.

EDIT: while I was at it, I figured I might try to add some crude error handling as well. I'd like the option of stopping the (SMP) client if it encounters some error (EUE, UNSTABLE_MACHINE etc). At a glance, couldn't find any info on the client return codes at the WIKI, though. Is it always 0, no matter what?

Code: Select all

@echo off
pushd Desktop\FAHSMP

:START
echo **** INSERT oneunit.txt FILE ON DESKTOP TO STOP THE CLIENT AFTER UNIT IS FINISHED ****
Folding@home-Win32-x86 -oneunit
if errorlevel 1 goto ERRORHANDLING
if exist ..\oneunit.txt goto ONEUNIT
goto START

:ERRORHANDLING
echo **** THE CLIENT EXITED WITH ERRORLEVEL %ERRORLEVEL%, EXITING SCRIPT ****
goto STOP

:ONEUNIT
echo **** FILE oneunit.txt FOUND ON DESKTOP, EXITING SCRIPT ****
goto STOP

:STOP
if exist ..\oneunit.txt del ..\oneunit.txt
popd

Win7 64bit, FAH v7, OC'd
2C/4T Atom330 3x667MHz - GT430 2x832.5MHz - ION iGPU 3x466.7MHz
NaCl - Core_15 - display
Post Reply