*** empty log message ***

svn path=/trunk/boinc/; revision=3341
This commit is contained in:
David Anderson 2004-05-05 17:48:39 +00:00
parent 87e7ad604b
commit 9c8fb41c4d
13 changed files with 263 additions and 234 deletions

View File

@ -11907,6 +11907,10 @@ David May 2 2004
Its only role was to store the project name.
This is now in the config file instead.
NOTE: if you upgrade to this code, you must add an entry
<long_name>...</long_name>
to your config.xml file.
db/
boinc_db.C,h
schema.sql
@ -11966,6 +11970,13 @@ David May 3 2004
*.C
start
David May 3 2004
- core client, Unix: if app is killed by SIGKILL,
put it in limbo (same as if exited zero without writing finish file).
client/
app.C
Rom May 3 2004
- Try to cleanup a recursive failure during a dump to stderr by changing
the fprintf call in diagnostics.c
@ -12013,8 +12024,8 @@ Rom May 4 2004
db_ops.inc
Rom May 4 2004
- Use a more optimized query for the results summary page, load times go from
8-10 seconds to 1-2 seconds
- Use a more optimized query for the results summary page,
load times go from 8-10 seconds to 1-2 seconds
- Fix client_version_num bug after field was renamed to app_version_num
html/inc/
@ -12051,3 +12062,26 @@ Rom May 4 2004
- Tag for 3.03 release, all platforms
boinc_core_release_3_03
seti_boinc_app_release_3_03
David May 5 2004
- fixed bug where Unix client ignored QUIT signal
- rename CLIENT_STATE::cleanup_and_exit()
to CLIENT_STATE::quit_activities()
(this function does NOT exit!!!!)
- quit_client(): exit() after quitting activities
(this is why the client wasn't exiting)
- quit_client(), susp_client(), resume_client():
print messages about which signal was received
- core client, Unix: if app is killed by SIGQUIT,
put it in limbo (same as if exited zero without writing finish file).
client/
app.C
client_state.h
cs_apps.C
main.C
win/
wingui_mainwindow.cpp
tools/
backend_lib.C
create_work.C

View File

@ -748,10 +748,18 @@ bool ACTIVE_TASK_SET::check_app_exited() {
atp->exit_status
);
} else if (WIFSIGNALED(stat)) {
int signal = WTERMSIG(stat);
// if the process was externally killed, allow it to restart.
//
if (signal==SIGKILL || signal==SIGQUIT) {
atp->state = PROCESS_IN_LIMBO;
return true;
}
atp->exit_status = stat;
atp->result->exit_status = atp->exit_status;
atp->state = PROCESS_WAS_SIGNALED;
atp->signal = WTERMSIG(stat);
atp->signal = signal;
atp->result->signal = atp->signal;
atp->result->active_task_state = PROCESS_WAS_SIGNALED;
gstate.report_result_error(

View File

@ -178,7 +178,7 @@ private:
// --------------- cs_apps.C:
public:
int restart_tasks();
int cleanup_and_exit();
int quit_activities();
int set_nslots();
double estimate_cpu_time(WORKUNIT&);
double get_fraction_done(RESULT* result);

View File

@ -54,27 +54,22 @@ int CLIENT_STATE::make_slot_dirs() {
return 0;
}
// Perform a graceful shutdown of the client, including quitting
// all applications, checking their final status, and writing
// the client_state.xml file (should we also terminate net_xfers here?)
// Quit running applications, quit benchmarks,
// write the client_state.xml file
// (should we also terminate net_xfers here?)
//
int CLIENT_STATE::cleanup_and_exit() {
int CLIENT_STATE::quit_activities() {
int retval;
retval = active_tasks.exit_tasks();
if (retval) {
msg_printf(NULL, MSG_ERROR, "CLIENT_STATE.cleanup_and_exit: exit_tasks failed\n");
// don't return here - we'll exit anyway
msg_printf(NULL, MSG_ERROR, "CLIENT_STATE.quit_activities: exit_tasks failed\n");
}
retval = write_state_file();
if (retval) {
msg_printf(NULL, MSG_ERROR, "CLIENT_STATE.cleanup_and_exit: write_state_file failed\n");
// don't return here - we'll exit anyway
msg_printf(NULL, MSG_ERROR, "CLIENT_STATE.quit_activities: write_state_file failed\n");
}
abort_cpu_benchmarks();
msg_printf(NULL, MSG_INFO, "Exiting BOINC client");
return 0;
}

View File

@ -155,22 +155,36 @@ int add_new_project() {
return 0;
}
void quit_client(int a) {
gstate.cleanup_and_exit();
void quit_client(int signum) {
if (signum) {
msg_printf(NULL, MSG_INFO, "Received signal %d - exiting", signum);
} else {
msg_printf(NULL, MSG_INFO, "Exiting - user request");
}
gstate.quit_activities();
exit(0);
}
void susp_client(int a) {
void susp_client(int signum) {
if (signum) {
msg_printf(NULL, MSG_INFO, "Received signal %d - Suspending activity", signum);
} else {
msg_printf(NULL, MSG_INFO, "Suspending activity - user request");
}
gstate.active_tasks.suspend_all();
msg_printf(NULL, MSG_INFO, "Suspending activity - user request");
#ifndef WIN32
signal(SIGTSTP, SIG_DFL);
raise(SIGTSTP);
#endif
}
void resume_client(int a) {
void resume_client(int signum) {
gstate.active_tasks.unsuspend_all();
msg_printf(NULL, MSG_INFO, "Resuming activity");
if (signum) {
msg_printf(NULL, MSG_INFO, "Received signal %d: resuming activity", signum);
} else {
msg_printf(NULL, MSG_INFO, "Resuming activity");
}
}
#ifdef WIN32
@ -179,7 +193,7 @@ BOOL WINAPI ConsoleControlHandler ( DWORD dwCtrlType ){
switch( dwCtrlType ){
case CTRL_C_EVENT:
if(gstate.activities_suspended) {
resume_client(NULL);
resume_client(0);
} else {
susp_client(NULL);
}
@ -276,11 +290,11 @@ int boinc_main_loop(int argc, char** argv) {
break;
}
if (gstate.requested_exit) {
msg_printf(NULL, MSG_INFO, "Exit requested by signal");
msg_printf(NULL, MSG_INFO, "Exit requested by user");
break;
}
}
gstate.cleanup_and_exit();
gstate.quit_activities();
return 0;
}

View File

@ -1581,7 +1581,7 @@ void CMainWindow::OnCommandExit()
if (already_exited) return;
already_exited = true;
gstate.cleanup_and_exit();
gstate.quit_activities();
PostQuitMessage(0);
KillTimer(m_nGuiTimerID);

109
doc/client_unix.php Normal file
View File

@ -0,0 +1,109 @@
<?
require_once("docutil.php");
page_head("Installing and running the BOINC command-line client");
echo "
<h3>The BOINC command-line client</h3>
<p>
Install the BOINC client by using gunzip to decompress the application.
Use 'chmod' to make it executable.
Put it in a directory by itself.
Run it manually, from your login script,
or from system startup files.
<p>
The command line client has several options:
";
list_start();
list_item("-attach_project",
"Attach this computer to a new project.
You must have an account with that project.
You will be asked for the project URL and the account ID."
);
list_item("-show_projects",
"Print a list of projects to which this computer is attached."
);
list_item("-detach_project URL",
"Detach this computer from a project."
);
list_item("-reset_project URL",
"Clear pending work for a project.
Use this if there is a problem that is preventing
your computer from working."
);
list_item("-update_prefs URL",
"Contact a project's server to obtain new preferences."
);
list_item("-run_cpu_benchmarks",
"Run CPU benchmarks.
Do this if you have modified your computer's hardware."
);
list_item("-help",
"Show client options."
);
list_item("-version",
"Show client version."
);
list_end();
echo"
<a name=mac>
<h3>Installing BOINC on Mac OS/X</h3>
<p>
The Mac OS X client will unpack correctly with gunzip on Mac OS X
10.2 (jaguar) or 10.3 (panther) as long as you type the command
within Terminal. Stuffit 7.x or newer will work under the Finder
in either OS X or OS 9, but I'd recommend using 'gunzip' or 'gzip -d'
within Terminal instead.
<p>
However, the two main browsers on OS X (IE 5.2.x and Safari 1.x) will
automatically unpack downloads by default, so your work may already
be done.
<p>
If you use IE, the boinc client will download and automatically unpack
leaving two files:
<ol>
<li>
boinc_2.12_powerpc-apple-darwin
[this will have the stuffit icon in the finder]
<li>
boinc_2.12_powerpc-apple-darwin7.0.0
[this will not have any icon in the finder]
</ol>
<p>
#2 is the unpacked program ready-to-run. You can just start Terminal
and run boinc.
<p>
If you use Safari, the boinc client will download and automatically
unpack, leaving a single file:
<ul>
<li>
boinc_2.12_powerpc-apple-darwin7.0.0
[this will not have any icon in the finder]
</ul>
This is the unpacked program, but it's not yet ready-to-run (this is
a bug with how Safari handles gzipped downloads; we'll fix this soon).
<p>
Here's what you have to do to fix the Safari download (apologies if
you already know how to do this):
<ul>
<li> Create a folder in your home directory and put the boinc
file in it
<li> Start Terminal
<li> 'cd' to the folder you just created
<li> Type 'chmod +x boinc_2.12_powerpc-apple-darwin7.0.0'
(without the quotes)
</ul>
Now you can run BOINC.
";
page_tail();
?>

View File

@ -1,15 +1,7 @@
<?
require_once("docutil.php");
page_head("Installing and running the BOINC client");
page_head("Installing and running the Windows GUI client");
echo "
<ul>
<li><a href=#win>Instructions for the Windows client</a>
<li><a href=#cmdline>Instructions for the command-line client</a>
(Mac OS/X, Linus, Unix)
<li><a href=#mac>Additional instructions for Mac OS/X</a>
</ul>
<a name=win>
<h3>BOINC for Windows</h3>
<p>
Install BOINC by running the installer program.
<p>
@ -121,111 +113,6 @@ The <b>BOINC screensaver</b> can be selected using the Display Properties dialog
The BOINC screensaver draws graphics from a running application,
if any is available.
Otherwise it draws the BOINC logo bouncing around the screen.
<hr>
<a name=cmdline>
<h3>The BOINC command-line client</h3>
<p>
Install the BOINC client by using gunzip to decompress the application.
Use 'chmod' to make it executable.
Put it in a directory by itself.
Run it manually, from your login script,
or from system startup files.
<p>
The command line client has several options:
";
list_start();
list_item("-attach_project",
"Attach this computer to a new project.
You must have an account with that project.
You will be asked for the project URL and the account ID."
);
list_item("-show_projects",
"Print a list of projects to which this computer is attached."
);
list_item("-detach_project URL",
"Detach this computer from a project."
);
list_item("-reset_project URL",
"Clear pending work for a project.
Use this if there is a problem that is preventing
your computer from working."
);
list_item("-update_prefs URL",
"Contact a project's server to obtain new preferences."
);
list_item("-run_cpu_benchmarks",
"Run CPU benchmarks.
Do this if you have modified your computer's hardware."
);
list_item("-help",
"Show client options."
);
list_item("-version",
"Show client version."
);
list_end();
echo"
<a name=mac>
<h3>Installing BOINC on Mac OS/X</h3>
<p>
The Mac OS X client will unpack correctly with gunzip on Mac OS X
10.2 (jaguar) or 10.3 (panther) as long as you type the command
within Terminal. Stuffit 7.x or newer will work under the Finder
in either OS X or OS 9, but I'd recommend using 'gunzip' or 'gzip -d'
within Terminal instead.
<p>
However, the two main browsers on OS X (IE 5.2.x and Safari 1.x) will
automatically unpack downloads by default, so your work may already
be done.
<p>
If you use IE, the boinc client will download and automatically unpack
leaving two files:
<ol>
<li>
boinc_2.12_powerpc-apple-darwin
[this will have the stuffit icon in the finder]
<li>
boinc_2.12_powerpc-apple-darwin7.0.0
[this will not have any icon in the finder]
</ol>
<p>
#2 is the unpacked program ready-to-run. You can just start Terminal
and run boinc.
<p>
If you use Safari, the boinc client will download and automatically
unpack, leaving a single file:
<ul>
<li>
boinc_2.12_powerpc-apple-darwin7.0.0
[this will not have any icon in the finder]
</ul>
This is the unpacked program, but it's not yet ready-to-run (this is
a bug with how Safari handles gzipped downloads; we'll fix this soon).
<p>
Here's what you have to do to fix the Safari download (apologies if
you already know how to do this):
<ul>
<li> Create a folder in your home directory and put the boinc
file in it
<li> Start Terminal
<li> 'cd' to the folder you just created
<li> Type 'chmod +x boinc_2.12_powerpc-apple-darwin7.0.0'
(without the quotes)
</ul>
Now you can run BOINC.
";
page_tail();
?>

View File

@ -84,6 +84,12 @@ Several other distributed computing projects are evaluating BOINC.
<center>
<h2>News</h2>
</center>
<b>May 2, 2004</b>
<br>
General preferences are now propagated from client to server,
but only to accounts with the same email address
as where the preferences originated.
<br><br>
<b>April 20, 2004</b>
<br>
Added <a href=cpid.php>cross-project identification</a> system.

View File

@ -8,15 +8,19 @@ echo "
<li> <a href=projects.php>Choosing project(s)</a>
<li> <a href=host_requirements.php>System requirements</a>
<li> <a href=account.php>Joining a project</a>
<li> <a href=client.php>Running the BOINC client</a>
<li> Installing and running the BOINC client
<ul>
<li> <a href=client_windows.php>Windows GUI</a>
<li> <a href=client_unix.php>Command-line version (Unix, Mac OS/X)</a>
<li> <a href=service.php>Windows service</a>
</ul>
<li> <a href=prefs.php>Preferences</a>
<li> <a href=host_id.php>Host identification and merging</a>
<li> <a href=startup.php>Participating in multiple projects</a>
<li> <a href=credit.php>Computation credit</a>
<li> <a href=teams.php>Teams</a>
<li> <a href=anonymous_platform.php>Compiling BOINC software yourself</a>
<li> User-supplied FAQs by
<a href=http://homepage.mac.com/pauldbuck/>Paul D. Buck</a> and
<li> User-supplied FAQ by
<a href=http://users.iafrica.com/c/ch/chrissu/boinc-README.html>Chris Sutton</a>
<li> <a href=http://setiboinc.ssl.berkeley.edu/ap/stats.php>Leader boards</a>
</ul>

41
doc/service.php Normal file
View File

@ -0,0 +1,41 @@
<?
require_once("docutil.php");
page_head("Running BOINC as a Windows Service");
echo "
<p>
BOINC can be run as a Windows service.
This requires the command-line interface (CLI) version of the core client,
which is not available for download;
you'll have to build it from the source code
using Visual Studio .Net.
<p>
If you haven't already run BOINC on the machine,
you'll need to run through the setup procedure
(using either the CLI or the GUI client)
in order to establish the
account* files which are needed for the project URLs and authenticators.
<p>
Then put the CLI executable (boinc_cli.exe) into the BOINC folder.
Type this from the commandline:
<pre>
boinc_cli -install
</pre>
This will setup BOINC as a Windows service which can be started on boot
and will be hidden from view.
If you are executing this on a Windows 2003 machine
the default user account that is chosen is 'Network
Service' which means you'll need to grant Read/Write/Execute/Delete permissions
to the client folder and all of its children before attempting to start
the service.
On Windows XP and older systems the client currently sets
itself up as local system.
<p>
Messages are logged to the 'eventlog' - check there
periodically for error and status messages.
";
page_tail();
?>

View File

@ -302,46 +302,3 @@ int create_work(
return 0;
}
#if 0
int create_sequence(
DB_WORKUNIT& wu,
char* wu_template,
char* result_template_filename,
char* infile_dir,
char** infiles,
int ninfiles,
R_RSA_PRIVATE_KEY& key,
char* upload_url, char* download_url,
int nsteps
) {
int i, retval;
DB_WORKSEQ ws;
retval = ws.insert();
if (retval) return retval;
for (i=0; i<nsteps; i++) {
// to be completed
}
return 0;
}
int create_sequence_group(
DB_WORKUNIT& wu,
char* wu_template,
char* result_template_filename,
char* infile_dir,
char** infiles,
int ninfiles,
R_RSA_PRIVATE_KEY& key,
char* upload_url, char* download_url,
int nsteps
) {
// WORKSEQ ws;
// int i;
// for (i=0; i<redundancy; i++) {
// }
return 0;
}
#endif

View File

@ -22,7 +22,8 @@
// -wu_name name
// -wu_template filename
// -result_template filename
// [ -db_name x ] // read the following from config.xml if available
// the following are read from config.xml if available
// [ -db_name x ]
// [ -db_passwd x ]
// [ -db_user x]
// [ -db_host x]
@ -30,7 +31,8 @@
// [ -download_url x ]
// [ -download_dir x ]
// [ -keyfile path ]
// [ -rsc_fpops_est n ] // see defaults below
// the following can be supplied in WU template; see defaults below
// [ -rsc_fpops_est n ]
// [ -rsc_fpops_bound n ]
// [ -rsc_memory_bound n ]
// [ -rsc_disk_bound n ]
@ -40,14 +42,11 @@
// [ -max_error_results x ]
// [ -max_total_results x ]
// [ -max_success_results x ]
// [ -sequence n ]
// infile1 infile2 ...
//
// Create a workunit and results.
// Create a workunit.
// Input files must be in the download dir.
// template-doc is an XML WU description file, with the following macros:
// INFILEn gets replaced by the name of input file n
// MD5n gets replaced by the MD5 checksum of input file n
// See the docs for a description of WU and result template files
//
#include <stdio.h>
@ -68,7 +67,7 @@ int main(int argc, char** argv) {
char wu_template_file[256], result_template_file[256];
char keyfile[256];
char** infiles = NULL;
int i, ninfiles, sequence=0;
int i, ninfiles;
R_RSA_PRIVATE_KEY key;
char download_dir[256], db_name[256], db_passwd[256],db_user[256],db_host[256];
char upload_url[256], download_url[256];
@ -100,8 +99,8 @@ int main(int argc, char** argv) {
} else {
strcpy(db_name, config.db_name);
strcpy(db_passwd, config.db_passwd);
strcpy(db_user, config.db_user);
strcpy(db_host, config.db_host);
strcpy(db_user, config.db_user);
strcpy(db_host, config.db_host);
strcpy(download_url, config.download_url);
strcpy(download_dir, config.download_dir);
strcpy(upload_url, config.upload_url);
@ -153,8 +152,6 @@ int main(int argc, char** argv) {
wu.max_total_results = atoi(argv[++i]);
} else if (!strcmp(argv[i], "-max_success_results")) {
wu.max_success_results = atoi(argv[++i]);
} else if (!strcmp(argv[i], "-sequence")) {
sequence = atoi(argv[++i]);
} else {
if (!strncmp("-",argv[i],1)) {
fprintf(stderr, "create_work: bad argument '%s'\n", argv[i]);
@ -174,12 +171,6 @@ int main(int argc, char** argv) {
CHKARG_STR(wu.name , "need -wu_name");
CHKARG_STR(wu_template_file , "need -wu_template");
CHKARG_STR(result_template_file , "need -result_template");
CHKARG(wu.delay_bound , "need -delay_bound");
CHKARG(wu.min_quorum , "need -min_quorum");
CHKARG(wu.target_nresults , "need -target_nresults");
CHKARG(wu.max_error_results , "need -max_error_results");
CHKARG(wu.max_total_results , "need -max_total_results");
CHKARG(wu.max_success_results , "need -max_success_results");
#undef CHKARG
#undef CHKARG_STR
@ -209,37 +200,20 @@ int main(int argc, char** argv) {
exit(1);
}
if (sequence) {
#if 0
retval = create_sequence_group(
wu,
wu_template,
result_template_file,
download_dir,
infiles,
ninfiles,
key,
upload_url,
download_url,
sequence
);
#endif
} else {
retval = create_work(
wu,
wu_template,
result_template_file,
download_dir,
const_cast<const char **>(infiles),
ninfiles,
key,
upload_url,
download_url
);
if (retval) {
fprintf(stderr, "create_work: %d\n", retval);
exit(1);
}
retval = create_work(
wu,
wu_template,
result_template_file,
download_dir,
const_cast<const char **>(infiles),
ninfiles,
key,
upload_url,
download_url
);
if (retval) {
fprintf(stderr, "create_work: %d\n", retval);
exit(1);
}
boinc_db.close();
}