GPU3 (Core 15) & Linux discussion

Moderators: slegrand, Site Moderators, PandeGroup

Re: GPU3 (Core 15) & Linux discussion

Postby jimerickson » Wed Jul 07, 2010 11:12 pm

still respawns. the only way to kill it is to manually issue "wineserver -k", ctrl+c does not work. also it returned the following when attempting a shutdown of the client.

Code: Select all
./auto-mator.sh: line 41: syntax error near unexpected token `elif'
./auto-mator.sh: line 41: `     elif (( ${PIDS[c]} = "FahCore_11.exe" ))'
jimerickson
 
Posts: 684
Joined: Tue May 27, 2008 11:56 pm
Location: ames, iowa

Re: GPU3 (Core 15) & Linux discussion

Postby Shelnutt2 » Thu Jul 08, 2010 12:12 am

Hmm, weird. I updated it again, try it now.

http://www.linuxfah.info/wrapper-3.0/auto-mater.sh

When you hit ctrl + c it exits the script right? It should also echo "Exiting, thank's for using auto-mator". Do you see that? Maybe my trap isn't being called right?
OCforums, T32

Linux Lober!
Shelnutt2
 
Posts: 150
Joined: Sun Dec 02, 2007 5:37 pm

Re: GPU3 (Core 15) & Linux discussion

Postby jimerickson » Thu Jul 08, 2010 12:26 am

shelnutt2

yes that update did it! ctrl+c nows causes script to echo its message and the client shuts down. there was no loss of the work unit. thanks again!
jimerickson
 
Posts: 684
Joined: Tue May 27, 2008 11:56 pm
Location: ames, iowa

Re: GPU3 (Core 15) & Linux discussion

Postby jimerickson » Thu Jul 08, 2010 2:51 am

shelnutt2

sorry to be the bearer of bad news but running the client with auto-mator.sh was causing the client to hang. this happened on two consecutive work units (both were project 10632). as long as i don't use auto-mator.sh the client will finish the work unit without further problem. just thought i should let you know. i have no idea what is causing this but if i can be of assistance just let me know.
jimerickson
 
Posts: 684
Joined: Tue May 27, 2008 11:56 pm
Location: ames, iowa

Re: GPU3 (Core 15) & Linux discussion

Postby Shelnutt2 » Thu Jul 08, 2010 4:03 am

You know, I know exactly what the problem is, and once again it's a simple mistake. I'll have it fixed in a few

edit:

Try it now :)

http://www.linuxfah.info/wrapper-3.0/auto-mater.sh

Code: Select all
#!/bin/bash
# Script to automatically adjust the SLEEPTIME in gpu3 wrapper.
# Copyright 2010 Seth Shelnutt
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA

trap 'killz' INT
killz(){
FAHPID=($(ps aux | egrep "Folding@home-Win32-GPU.exe" | grep -v grep | awk 'BEGIN { FS= " " } { print $2 }'))
kill -l 2 $FAHPID
wineserver -k
wineserver -k
echo "Exiting, thank's for using auto-mator"
exit 0
}


export SLEEPTIME="3000000"
RUNGPU="COPY AND PASTE YOUR COMMAND YOU NORMALLY USE TO START FAH HERE"
eval $RUNGPU &
sleep 15


if $(ps aux | egrep "FahCore_15.exe" | grep -v grep | awk 'BEGIN { FS= " " } { print $2 }')
  then
   export PID=($(ps aux | egrep "FahCore_15.exe" | grep -v grep | awk 'BEGIN { FS= " " } { print $2 }'))
elif $(ps aux | egrep "FahCore_11.exe" | grep -v grep | awk 'BEGIN { FS= " " } { print $2 }')
  then
   export PID=($(ps aux | egrep "FahCore_11.exe" | grep -v grep | awk 'BEGIN { FS= " " } { print $2 }'))

fi

while true
do
CPUP=$(top -bn 3 -p $PID | grep FahCore | awk 'BEGIN { FS=" " } { print $9 }')
CPUP1=$(echo $CPUP | awk ' BEGIN { fs=" " } { print $1 }')
CPUP2=$(echo $CPUP | awk ' BEGIN { fs=" " } { print $2 }')
CPUP3=$(echo $CPUP | awk ' BEGIN { fs=" " } { print $3 }')
CPU=$((($CPUP3 + $CPUP2 + $CPUP1) / 3))

if [ "$CPU" -le "25" ]
then
   sleep 60

elif [ "$CPU" -le "8" ]
then
   SLEEPTIME=$(( $SLEEPTIME + 2500 ))
   export $SLEEPTIME
   sleep 5
else
   SLEEPTIME=$(( $SLEEPTIME - 5000 ))
   sleep 5
   export $SLEEPTIME

done


exit 0
Last edited by Shelnutt2 on Thu Jul 08, 2010 1:13 pm, edited 1 time in total.
Shelnutt2
 
Posts: 150
Joined: Sun Dec 02, 2007 5:37 pm

Re: GPU3 (Core 15) & Linux discussion

Postby jimerickson » Thu Jul 08, 2010 5:12 am

shelnutt2
it is running ok so far. it returned this at the beginning of the work unit.

Code: Select all
./auto-mator.sh: line 36: 20879: command not found
./auto-mator.sh: line 56: syntax error near unexpected token `elif'
./auto-mator.sh: line 56: `elif [ "$CPU" -le "8" ]'
jimerickson
 
Posts: 684
Joined: Tue May 27, 2008 11:56 pm
Location: ames, iowa

Re: GPU3 (Core 15) & Linux discussion

Postby Shelnutt2 » Thu Jul 08, 2010 1:14 pm

Try it again. I'm sorry it's not just working but it's hard to fully test it cause I can't actually run it.
Shelnutt2
 
Posts: 150
Joined: Sun Dec 02, 2007 5:37 pm

Re: GPU3 (Core 15) & Linux discussion

Postby jimerickson » Thu Jul 08, 2010 7:44 pm

shelnutt2

tried it again. it no longer returns the 3 lines mentioned previously. but it is ignoring ctrl+c. ran client with it all night and there were no hangs. still the only way to kill it is to manually issue "wineserver -k".
jimerickson
 
Posts: 684
Joined: Tue May 27, 2008 11:56 pm
Location: ames, iowa

Re: GPU3 (Core 15) & Linux discussion

Postby Shelnutt2 » Thu Jul 08, 2010 10:31 pm

jimerickson wrote:shelnutt2

tried it again. it no longer returns the 3 lines mentioned previously. but it is ignoring ctrl+c. ran client with it all night and there were no hangs. still the only way to kill it is to manually issue "wineserver -k".


Are you getting the "Exiting, thank's for using auto-mator" message? Or has that gone away again? That tells me if the trap is working properly or if it's not getting called for some reason.
Shelnutt2
 
Posts: 150
Joined: Sun Dec 02, 2007 5:37 pm

Re: GPU3 (Core 15) & Linux discussion

Postby jimerickson » Fri Jul 09, 2010 2:05 am

shelnutt2

exit message has gone away again.
jimerickson
 
Posts: 684
Joined: Tue May 27, 2008 11:56 pm
Location: ames, iowa

Re: GPU3 (Core 15) & Linux discussion

Postby Shelnutt2 » Fri Jul 09, 2010 3:28 am

I think I've got it now... hopefully!!

http://www.linuxfah.info/wrapper-3.0/auto-mater.sh

Code: Select all
#!/bin/bash
# Script to automatically adjust the SLEEPTIME in gpu3 wrapper.
# Copyright 2010 Seth Shelnutt
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA

trap 'killz' INT
killz(){
wineserver -k
echo "Exiting, thank's for using auto-mator"
exit 0
}

export SLEEPTIME="3000000"
RUNGPU="wine Folding@home-Win32-GPU.exe"
eval $RUNGPU &
sleep 15


if $(ps aux | egrep "FahCore_15.exe" | grep -v grep | awk 'BEGIN { FS= " " } { print $2 }')
  then
   export PID=($(ps aux | egrep "FahCore_15.exe" | grep -v grep | awk 'BEGIN { FS= " " } { print $2 }'))
elif $(ps aux | egrep "FahCore_11.exe" | grep -v grep | awk 'BEGIN { FS= " " } { print $2 }')
  then
   export PID=($(ps aux | egrep "FahCore_11.exe" | grep -v grep | awk 'BEGIN { FS= " " } { print $2 }'))
else
echo "There must be a new FahCore!"
fi

while true
do
CPUP=$(top -bn 3 -p $PID | grep "FahCore" | awk 'BEGIN { FS=" " } { print $9 }')
CPUP1=$(echo $CPUP | awk ' BEGIN { fs=" " } { print $1 }')
CPUP2=$(echo $CPUP | awk ' BEGIN { fs=" " } { print $2 }')
CPUP3=$(echo $CPUP | awk ' BEGIN { fs=" " } { print $3 }')
CPU=$((($CPUP3 + $CPUP2 + $CPUP1) / 3))

if [ "$CPU" -le "25" ]
then
   sleep 60

elif [ "$CPU" -le "8" ]
then
   SLEEPTIME=$(( $SLEEPTIME + 2500 ))
   export $SLEEPTIME
   sleep 5
else
   SLEEPTIME=$(( $SLEEPTIME - 5000 ))
   export $SLEEPTIME
   sleep 5
fi
done


exit 0
Last edited by Shelnutt2 on Fri Jul 09, 2010 5:06 pm, edited 1 time in total.
Shelnutt2
 
Posts: 150
Joined: Sun Dec 02, 2007 5:37 pm

Re: GPU3 (Core 15) & Linux discussion

Postby jimerickson » Fri Jul 09, 2010 3:45 pm

shellnutt2

sorry it still is ignoring ctrl+c. also no exit message. could i be doing something wrong? even tried a reboot but no luck. still ignores ctrl+c. hope there isn't a problem with my machine.
jimerickson
 
Posts: 684
Joined: Tue May 27, 2008 11:56 pm
Location: ames, iowa

Re: GPU3 (Core 15) & Linux discussion

Postby Shelnutt2 » Fri Jul 09, 2010 5:07 pm

Alright try it one last time. I think I've got it now :)
Shelnutt2
 
Posts: 150
Joined: Sun Dec 02, 2007 5:37 pm

Re: GPU3 (Core 15) & Linux discussion

Postby jimerickson » Fri Jul 09, 2010 6:40 pm

shelnutt2

sorry no luck. even multiple ctrl+c will not halt the client. no exit message either. i have been anxiously awaiting this script, so i can live with issuing "wineserver -k", but if you want further testing don't be afraid to ask me.
jimerickson
 
Posts: 684
Joined: Tue May 27, 2008 11:56 pm
Location: ames, iowa

Re: GPU3 (Core 15) & Linux discussion

Postby Shelnutt2 » Sat Jul 10, 2010 2:24 pm

jimerickson wrote:shelnutt2

sorry no luck. even multiple ctrl+c will not halt the client. no exit message either. i have been anxiously awaiting this script, so i can live with issuing "wineserver -k", but if you want further testing don't be afraid to ask me.


That is very weird, because even though I can't run the client, if I use this script and start the client but hit ctrl + c before it errors out I get the exist message and wineserver -k is run. So as far as I can tell it seems to be working, but it's not for you.
Shelnutt2
 
Posts: 150
Joined: Sun Dec 02, 2007 5:37 pm

PreviousNext

Return to unOfficial Linux GPU (WINE wrapper) (3rd party support)

Who is online

Users browsing this forum: No registered users and 0 guests

cron