diff --git a/checkin_notes b/checkin_notes index 0c69b70fcc..d8bd03157c 100755 --- a/checkin_notes +++ b/checkin_notes @@ -16405,3 +16405,17 @@ David 14 Aug 2004 net_xfer.C lib/ util.C,h + +David 14 Aug 2004 + - changed "engine" to "type" in schema SQL + + db/ + schema.sql + +David 14 Aug 2004 + - compile fixes and more commenting-out of disk mgt code + + sched/ + delete_file.C + sched_send.C + server_types.C,h diff --git a/client/app_start.C b/client/app_start.C index c9a79141d6..3d8de8aad7 100644 --- a/client/app_start.C +++ b/client/app_start.C @@ -24,12 +24,15 @@ #ifdef _WIN32 #include "boinc_win.h" #else -#if HAVE_SYS_IPC_H -#include +#if HAVE_SYS_TIME_H +#include #endif #if HAVE_SYS_RESOURCE_H #include #endif +#if HAVE_SYS_IPC_H +#include +#endif #if HAVE_SYS_WAIT_H #include #endif diff --git a/db/boinc_db.C b/db/boinc_db.C index db49ca5e18..476652a75b 100644 --- a/db/boinc_db.C +++ b/db/boinc_db.C @@ -991,7 +991,7 @@ int DB_SCHED_RESULT_ITEM_SET::update_workunits() { sprintf(query, "UPDATE workunit SET transition_time=%d WHERE id in (", - time(0) + (int)time(0) ); for (i=0; i0) strcat(query, ","); diff --git a/db/schema.sql b/db/schema.sql index db545c32f4..13ec7c7709 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -11,7 +11,7 @@ /* Fields are documented in boinc_db.h */ /* Do not replace this with an automatically generated schema */ -/* engine is specified as InnoDB for most tables. +/* type is specified as InnoDB for most tables. Supposedly this gives better performance. The others (post, thread, profile) are myISAM because it supports fulltext index @@ -24,7 +24,7 @@ create table platform ( user_friendly_name varchar(254) not null, deprecated integer not null, primary key (id) -) engine=InnoDB; +) type=InnoDB; create table core_version ( id integer not null auto_increment, @@ -35,7 +35,7 @@ create table core_version ( message varchar(254), deprecated smallint not null, primary key (id) -) engine=InnoDB; +) type=InnoDB; create table app ( id integer not null auto_increment, @@ -45,7 +45,7 @@ create table app ( deprecated integer not null, user_friendly_name varchar(254) not null, primary key (id) -) engine=InnoDB; +) type=InnoDB; create table app_version ( id integer not null auto_increment, @@ -58,7 +58,7 @@ create table app_version ( max_core_version integer not null, deprecated integer not null, primary key (id) -) engine=InnoDB; +) type=InnoDB; create table user ( id integer not null auto_increment, @@ -87,7 +87,7 @@ create table user ( has_profile smallint not null, cross_project_id varchar(254) not null, primary key (id) -) engine=InnoDB; +) type=InnoDB; create table team ( id integer not null auto_increment, @@ -106,7 +106,7 @@ create table team ( expavg_time double not null, seti_id integer not null, primary key (id) -) engine=InnoDB; +) type=InnoDB; create table host ( id integer not null auto_increment, @@ -157,7 +157,7 @@ create table host ( nresults_today integer not null, primary key (id) -) engine=InnoDB; +) type=InnoDB; /* * Only information needed by the server or other backend components @@ -193,7 +193,7 @@ create table workunit ( max_success_results integer not null, result_template_file varchar(63) not null, primary key (id) -) engine=InnoDB; +) type=InnoDB; create table result ( id integer not null auto_increment, @@ -224,7 +224,7 @@ create table result ( exit_status integer not null, teamid integer not null, primary key (id) -) engine=InnoDB; +) type=InnoDB; create table msg_from_host ( id integer not null auto_increment, @@ -234,7 +234,7 @@ create table msg_from_host ( handled smallint not null, xml text, primary key (id) -) engine=InnoDB; +) type=InnoDB; create table msg_to_host ( id integer not null auto_increment, @@ -244,7 +244,7 @@ create table msg_to_host ( handled smallint not null, xml text, primary key (id) -) engine=InnoDB; +) type=InnoDB; create table workseq ( id integer not null auto_increment, @@ -255,7 +255,7 @@ create table workseq ( wuid_last_sent integer not null, workseqid_master integer not null, primary key (id) -) engine=InnoDB; +) type=InnoDB; -- EVERYTHING FROM HERE ON IS USED ONLY FROM PHP, -- SO NOT IN BOINC_DB.H ETC. @@ -267,7 +267,7 @@ create table lang ( name varchar(254) not null, charset varchar(254) not null, primary key (id) -) engine=InnoDB; +) type=InnoDB; -- user profile (description, pictures) @@ -298,7 +298,7 @@ create table category ( name varchar(254) binary, is_helpdesk smallint not null, primary key (id) -) engine=InnoDB; +) type=InnoDB; -- message board topic -- @@ -313,7 +313,7 @@ create table forum ( threads integer not null, posts integer not null, primary key (id) -) engine=InnoDB; +) type=InnoDB; -- threads in a topic (or questions) -- @@ -362,4 +362,4 @@ create table post ( create table subscriptions ( userid integer not null, threadid integer not null -) engine=InnoDB; +) type=InnoDB; diff --git a/doc/api.php b/doc/api.php index 64e142b482..98f288fa5b 100644 --- a/doc/api.php +++ b/doc/api.php @@ -3,7 +3,9 @@ require_once("docutil.php"); page_head("The BOINC application programming interface (API)"); echo "

-The BOINC API is a set of C functions. +The BOINC API is a set of C++ functions. +Most of the functions have a C interface, +so that they can be used from programs written in C and other languages. Unless otherwise specified, the functions return an integer error code; zero indicates success.

diff --git a/doc/compound_app.php b/doc/compound_app.php index 5f01265086..088d782b40 100644 --- a/doc/compound_app.php +++ b/doc/compound_app.php @@ -11,10 +11,9 @@ and one or more worker programs. The main program executes the worker programs in sequence, and maintains a 'main state file' that records which worker programs have completed. -The main program assigns to each worker application +The main program assigns to each worker program a subrange of the overall 'fraction done' range of 0..1. -For example, if there are two subsidiary applications -with equal runtime, +For example, if there are two worker programs with equal runtime, the first would have range 0 to 0.5 and the second would have range 0.5 to 1. @@ -22,11 +21,9 @@ would have range 0.5 to 1.

The BOINC API provides a number of functions, and in developing a compound application you must decide -whether these functions are to be performed by -the main or worker program. +whether these functions are to be performed by the main or worker program. The functions are represented by flags in the BOINC_OPTIONS structure. -Each flag must be set in either the main or worker programs, -but not both. +Each flag must be set in either the main or worker programs, but not both.

 struct BOINC_OPTIONS {
@@ -85,7 +82,7 @@ options.main_program = true;
 ...
 boinc_init_options(options)
 read main state file
-for each remaining subsidiary application:
+for each remaining worker program:
     aid.fraction_done_start = x
     aid.fraction_done_end = y
     boinc_write_init_data_file()
@@ -118,7 +115,7 @@ boinc_finish();		// this writes final CPU time to app_init.xml file
 
 

If the graphics is handled in a program that runs concurrently with -the worker applications, it must also call +the worker programs, it must also call boinc_init_options(), typically with all options false, then boinc_init_graphics(), and eventually boinc_finish(). diff --git a/doc/db_dump.php b/doc/db_dump.php index c92324415d..7d6bd0fea7 100644 --- a/doc/db_dump.php +++ b/doc/db_dump.php @@ -10,8 +10,8 @@ This data can be imported and used to produce web sites that show statistics and leaderboards for one or more BOINC projects. Examples of such sites are listed at - -http://setiweb.ssl.berkeley.edu/ap/stats.php. + +http://setiweb.ssl.berkeley.edu/sah/stats.php.

Statistics data is exported in XML-format files. diff --git a/sched/delete_file.C b/sched/delete_file.C index f8fc6b549c..2a21a2f67e 100644 --- a/sched/delete_file.C +++ b/sched/delete_file.C @@ -27,11 +27,12 @@ // Create a msg_to_host_that requests that the host delete the // given file from the client +#include #if HAVE_UNISTD_H #include +#endif #include #include -#endif #include "boinc_db.h" #include "sched_config.h" diff --git a/sched/sched_send.C b/sched/sched_send.C index 5dc9d06821..9b2a0c0c92 100644 --- a/sched/sched_send.C +++ b/sched/sched_send.C @@ -763,14 +763,17 @@ int send_work( wreq.infeasible_only = false; scan_work_array(wreq, sreq, reply, platform, ss); - if(wreq.nresults == 0) { +#if 0 + // huh??? + if (wreq.nresults == 0) { wreq.disk_available = sreq.potentially_free_offender; scan_work_array(wreq, sreq, reply, platform, ss); } - if(wreq.nresults == 0 && config.delete_from_self) { + if (wreq.nresults == 0 && config.delete_from_self) { wreq.disk_available = sreq.potentially_free_self; scan_work_array(wreq, sreq, reply, platform, ss); } +#endif log_messages.printf( SCHED_MSG_LOG::NORMAL, "[HOST#%d] Sent %d results\n", diff --git a/sched/server_types.C b/sched/server_types.C index e8c5ff6001..c92efe57fa 100644 --- a/sched/server_types.C +++ b/sched/server_types.C @@ -100,9 +100,11 @@ int SCHEDULER_REQUEST::parse(FILE* fin) { else if (parse_double(buf, "", project_disk_usage)) continue; else if (parse_double(buf, "", total_disk_usage)) continue; +#if 0 else if (parse_double(buf, "", project_disk_free)) continue; else if (parse_double(buf, "", potentially_free_offender)) continue; else if (parse_double(buf, "", potentially_free_self)) continue; +#endif else if (parse_str(buf, "", host_venue, sizeof(host_venue))) continue; else if (match_tag(buf, "")) { strcpy(global_prefs_xml, "\n"); @@ -277,10 +279,8 @@ int SCHEDULER_REPLY::write(FILE* fout) { } #if 0 - // send project deletion policy - // - if(deletion_policy_priority) fprintf(fout, "\n"); - if(deletion_policy_expire) fprintf(fout, "\n"); + if (deletion_policy_priority) fprintf(fout, "\n"); + if (deletion_policy_expire) fprintf(fout, "\n"); #endif // acknowledge results diff --git a/sched/server_types.h b/sched/server_types.h index d7f0e16285..10aaa6ca1d 100644 --- a/sched/server_types.h +++ b/sched/server_types.h @@ -75,9 +75,11 @@ struct SCHEDULER_REQUEST { double total_disk_usage; double project_disk_usage; +#if 0 double project_disk_free; double potentially_free_offender; double potentially_free_self; +#endif bool anonymous_platform; vector client_app_versions;