- API: if app can't acquire lock file, tell the client not

to restart app for 10 minutes.
    Hopefully what will happen is:
    - another instance of app is running in slot dir
        (shouldn't happen, but sometimes does)
    - that app will eventually finish, and will write
        a checkpoint file saying so.
        It will call boinc_finish(0), but the client won't notice
        that it has exited.
    - the next time the client starts the app,
        it will acquire lock, see that it's done,
        and call boinc_finish(0).
        This time the client will notice,
        and the job will be reported as correct.
    The downside to all this is that the client won't know
    that the CPU is in use, and will schedule NCPUS jobs.

svn path=/trunk/boinc/; revision=20128
This commit is contained in:
David Anderson 2010-01-11 20:52:55 +00:00
parent 98f04138df
commit 0255297345
5 changed files with 50 additions and 6 deletions

View File

@ -415,7 +415,12 @@ int boinc_init_options_general(BOINC_OPTIONS& opt) {
windows_error_string(buf, 256);
fprintf(stderr, "%s Error: %s\n", boinc_msg_prefix(), buf);
#endif
boinc_exit(0); // status=0 means recoverable
// if we can't acquire the lock file there must be
// another app instance running in this slot.
// If we exit(0), the client will keep restarting us.
// Instead, tell the client not to restart us for 10 min.
//
boinc_temporary_exit(600);
}
}

View File

@ -270,3 +270,24 @@ David 10 Jan 2010
py/Boinc/
tools.py
David 11 Jan 2010
- API: if app can't acquire lock file, tell the client not
to restart app for 10 minutes.
Hopefully what will happen is:
- another instance of app is running in slot dir
(shouldn't happen, but sometimes does)
- that app will eventually finish, and will write
a checkpoint file saying so.
It will call boinc_finish(0), but the client won't notice
that it has exited.
- the next time the client starts the app,
it will acquire lock, see that it's done,
and call boinc_finish(0).
This time the client will notice,
and the job will be reported as correct.
The downside to all this is that the client won't know
that the CPU is in use, and will schedule NCPUS jobs.
api/
boinc_api.cpp

View File

@ -98,7 +98,7 @@ function page_tail($translatable=false, $is_main=false) {
if (!$is_main) {
echo "
<center>
<a href=\"/\">Return to BOINC main page</a>
<a href=\"/\">".tra("Return to BOINC main page")."</a>
</center><p>
";
}
@ -107,8 +107,13 @@ function page_tail($translatable=false, $is_main=false) {
<font color=#888888>
";
if ($translatable) {
echo "
This page is <a href=\"trac/wiki/TranslateIntro\">translatable</a>.<br>
echo
sprintf(
tra("This page is %stranslatable%s."),
"<a href=\"trac/wiki/TranslateIntro\">",
"</a>"
),
"<br>
";
}
echo "

View File

@ -123,7 +123,7 @@ function show_download($pname) {
| <a href=\"wiki/Release_Notes\"><span class=nobr>".tra("Release notes")."</span></a>
| <a href=\"wiki/BOINC_Help\"><span class=nobr>".tra("Help")."</span></a>
| <a href=download_all.php><span class=nobr>".tra("All versions")."</span></a>
| <a href=\"trac/wiki/VersionHistory\">Version history</a>
| <a href=\"trac/wiki/VersionHistory\">".tra("Version history")."</a>
</center>
</td><td valign=top>
";

View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: BOINC $Id$\n"
"Report-Msgid-Bugs-To: BOINC translation team <boinc_loc@ssl.berkeley.edu>\n"
"POT-Creation-Date: 2010-01-10 14:46 PST\n"
"POT-Creation-Date: 2010-01-11 12:46 PST\n"
"Last-Translator: Generated automatically from source files\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
@ -20,6 +20,15 @@ msgstr ""
msgid "Search"
msgstr ""
#: docutil.php:101
msgid "Return to BOINC main page"
msgstr ""
#: docutil.php:112
#, php-format
msgid "This page is %stranslatable%s."
msgstr ""
#: download.php:40
msgid "Download BOINC"
msgstr ""
@ -66,6 +75,10 @@ msgstr ""
msgid "All versions"
msgstr ""
#: download.php:126
msgid "Version history"
msgstr ""
#: download.php:143
msgid "BOINC: compute for science"
msgstr ""