Can SMP (run as a service) not to continue when done?

Moderators: Site Moderators, PandeGroup

Can SMP (run as a service) not to continue when done?

Postby jclu52 » Fri Apr 06, 2012 6:15 pm

Is there a way to tell v6 SMP client (6.34) running as a service not to continue when it's done with the current project?

If not, can I remove the service and run it in console mode and pass a command line argument to tell to stop after completing the current project?

Thanks.
Image
jclu52
 
Posts: 25
Joined: Sat May 09, 2009 1:16 am

Re: Can SMP (run as a service) not to continue when done?

Postby RoomateoYo » Fri Apr 06, 2012 6:46 pm

add the -oneunit flag into the extra parameters field
RoomateoYo
 
Posts: 50
Joined: Tue Oct 19, 2010 5:11 pm
Location: Jackson, MI

Re: Can SMP (run as a service) not to continue when done?

Postby jclu52 » Fri Apr 06, 2012 7:17 pm

Great! Is that a console flag?
jclu52
 
Posts: 25
Joined: Sat May 09, 2009 1:16 am

Re: Can SMP (run as a service) not to continue when done?

Postby Nathan_P » Fri Apr 06, 2012 7:23 pm

Yes
Image
Nathan_P
 
Posts: 1383
Joined: Wed Apr 01, 2009 9:22 pm
Location: Jersey, Channel islands

Re: Can SMP (run as a service) not to continue when done?

Postby jclu52 » Fri Apr 06, 2012 7:34 pm

Will v6 SMP client continue (say 64% done) if I stop the service then start the console client with the oneunit flag?
jclu52
 
Posts: 25
Joined: Sat May 09, 2009 1:16 am

Re: Can SMP (run as a service) not to continue when done?

Postby jclu52 » Sat Apr 07, 2012 12:14 am

I tried & I can change a service to a console client while fah continues to work where it was stopped. :mrgreen:

Here is the story-
Originally, I had fah SMP running as a service. When upgrading to v7, I want v6 to stop running and NOT downloading new WUs when v7 started running. After installing v7 and play with it a bit, I really like the UI it supports a lot of features that v6 did not including abilities to control other clients from within the same interface and ability to start / stop a client as needed. Although, technically, v6 allows you to start / stop a client as necessary. But it requires a few clicks here & there. So the new one is a lot easier / faster to work with.

Now, here is what I did -
  • Stop the service.
  • Copy the whole FAH v6 SMP client folder so that I can restore to its old state if the following failed.
  • I ran "fah6 -configonly" to only change one thing - remove the service and ran as a console client -
    Code: Select all
    Launch manually, remove the service in this directory (no/yes) [no]? yes
    Opening Service failed (5)
    It seems that it failed to remove the service.
  • I then ran fah6 in a console (command prompt) with a few parameters as:
    Code: Select all
    fah6 -oneunit -advmethods -smp 4 -verbosity 9
So far, it's chugging along just fine from where I stopped the service.

I will report back when it finish the current project and stop!
jclu52
 
Posts: 25
Joined: Sat May 09, 2009 1:16 am

Re: Can SMP (run as a service) not to continue when done?

Postby bruce » Sat Apr 07, 2012 5:57 am

The -oneunit flag will cause the client to shut down after the current WU finishes but it will NOT stop the service. By default, any service which fails will automatically be restarted, so after the client shuts down, Windows restarts it. Though it's not accurate, we normally say -oneunit doesn't work, although it's really a characteristic of Windows, not of FAH.

I'm reasonably confident you can make it work (though I never tried it). Open the Services Admin App in Control Panel and find the FAH service. Right-click and select Properties and select Recovery. It allows you to select what Windows should do if a service fails (stops).
bruce
 
Posts: 20839
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Can SMP (run as a service) not to continue when done?

Postby jclu52 » Sat Apr 07, 2012 2:54 pm

Bruce,

Thanks for the reply.

For some reason, fah6 failed to remove the service from Windows when I did a "-configonly" at the command prompt. Prior to this, I stop the service using Windows Services management tool (%windir%\system32\services.msc).

There is a command line tool to perform the same. I think it's "net stop".

In fact, you don't need to remove the service but only to stop it from running, you can run fah6 from the command line to continue where it left off. Plus adding the "-oneunit" flag to let fah6 know you don't want it to continue when the project is done.

The result is a positive one.

FaH6 finished the project and did not download another one. That was my main purpose of this thread. I wanted it to stop clean and I did it! Yeah! :D

Upon examining the result, the log says: Server reports problem with unit.
Is there a way to check if a WU was submitted successfully?

The completed & sent log:
Code: Select all
[02:02:40] Completed 500000 out of 500000 steps  (100%)
[02:02:41] DynamicWrapper: Finished Work Unit: sleep=10000
[02:02:51]
[02:02:51] Finished Work Unit:
[02:02:51] - Reading up to 12102120 from "work/wudata_09.trr": Read 12102120
[02:02:51] trr file hash check passed.
[02:02:51] edr file hash check passed.
[02:02:51] logfile size: 60426
[02:02:51] Leaving Run
[02:02:52] - Writing 12196222 bytes of core data to disk...
[02:02:55] Done: 12195710 -> 11289595 (compressed to 92.5 percent)
[02:02:55]   ... Done.
[02:03:01] - Shutting down core
[02:03:01]
[02:03:01] Folding@home Core Shutdown: FINISHED_UNIT
[02:03:05] CoreStatus = 64 (100)
[02:03:05] Unit 9 finished with 85 percent of time to deadline remaining.
[02:03:05] Updated performance fraction: 0.789820
[02:03:05] Sending work to server
[02:03:05] Project: 6098 (Run 0, Clone 53, Gen 113)


[02:03:05] + Attempting to send results [April 7 02:03:05 UTC]
[02:03:05] - Reading file work/wuresults_09.dat from core
[02:03:05]   (Read 11290107 bytes from disk)
[02:03:05] Connecting to http://128.143.231.202:8080/
[02:03:33] Posted data.
[02:03:33] Initial: 0000; - Uploaded at ~393 kB/s
[02:03:33] - Averaged speed for that direction ~376 kB/s
[02:03:33] - Server reports problem with unit.
[02:03:33] Trying to send all finished work units
[02:03:33] + No unsent completed units remaining.
[02:03:33] + -oneunit flag given and have now finished a unit. Exiting.***** Got a SIGTERM signal (2)
[02:03:33] Killing all core threads
[02:03:33] Could not get process id information.  Please kill core process manually

Folding@Home Client Shutdown.



I've always been trying to find a way to run fah6 from command line after I installed it as a service. This exercise completed my dream of doing so is possible. 8-)
jclu52
 
Posts: 25
Joined: Sat May 09, 2009 1:16 am

Re: Can SMP (run as a service) not to continue when done?

Postby bruce » Sat Apr 07, 2012 4:40 pm

jclu52 wrote:Upon examining the result, the log says: Server reports problem with unit.
Is there a way to check if a WU was submitted successfully?


The message is telling you that it was not accepted.

Manually stopping the service and running an interactive client with -oneunit is the method I always used on V6.
bruce
 
Posts: 20839
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Can SMP (run as a service) not to continue when done?

Postby jclu52 » Sat Apr 07, 2012 6:07 pm

Anything I can / need do to?
jclu52
 
Posts: 25
Joined: Sat May 09, 2009 1:16 am

Re: Can SMP (run as a service) not to continue when done?

Postby 7im » Sat Apr 07, 2012 10:04 pm

As far as that WU, if the server won't take it, the WU was corrupted. Move on to the next work unit when ready to fold again.

Also, the FAH WIKI is your friend... http://fahwiki.net/index.php/How_do_I_add_flags_when_running_the_console_in_service_mode%3F
Flags, like -oneunit. ;) See also Note 4.
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: 14648
Joined: Thu Nov 29, 2007 4:30 pm
Location: Arizona


Return to V6.34Beta SMP2 with passkey [Not Bigadv]

Who is online

Users browsing this forum: No registered users and 1 guest

cron