diff --git a/checkin_notes b/checkin_notes
index b3a8cd1ded..8b2da746e6 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -3885,3 +3885,32 @@ Bruce 20 April 2007
sched/
sched_locality.C
+David 23 Apr 2007
+ - make_project: remove --no_test_app option, add --test_app option
+ - make_project: initial config in all cases has
+ one_result_per_user_per_wu = 0
+ - sample_assimilator: make it able to handle > 1 output file
+ - boinc_cmd: make --help output more readable
+ - User web: fix some undefined vars in translation.inc
+ Rytis: let's try to fix PHP runtime warnings
+ - DB: add default values for app table (avoid MySQL warnings)
+
+ db/
+ schema.sql
+ html/
+ inc/
+ translation.inc
+ uotd.inc
+ ops/
+ update_forum_activities.php
+ lib/
+ str_util.C
+ boinc_cmd.C
+ py/Boinc/
+ setup_project.py
+ sched/
+ sample_work_generator.C
+ sample_assimilator.C
+ tools/
+ make_project
+ uc_wu, uc_result (new)
diff --git a/db/schema.sql b/db/schema.sql
index 01675d1e16..3c1111f67c 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -41,12 +41,12 @@ create table app (
id integer not null auto_increment,
create_time integer not null,
name varchar(254) not null,
- min_version integer not null,
- deprecated smallint not null,
+ min_version integer not null default 0,
+ deprecated smallint not null default 0,
user_friendly_name varchar(254) not null,
- homogeneous_redundancy smallint not null,
- weight double not null,
- beta smallint not null,
+ homogeneous_redundancy smallint not null default 0,
+ weight double not null default 1,
+ beta smallint not null default 0,
primary key (id)
) type=InnoDB;
diff --git a/doc/api.php b/doc/api.php
index 930e948a83..8b6a0c0aa9 100644
--- a/doc/api.php
+++ b/doc/api.php
@@ -1,6 +1,6 @@
The BOINC API is a set of C++ functions.
diff --git a/doc/build.php b/doc/build.php
index 4960d986da..a4d88e6b23 100644
--- a/doc/build.php
+++ b/doc/build.php
@@ -1,7 +1,7 @@
http://boinc.berkeley.edu.
-See the Software Prerequisites.
+See the Software Prerequisites.
Unix, Mac OS/X
diff --git a/doc/compile.php b/doc/compile.php
index 4318563d92..0fe745e96c 100644
--- a/doc/compile.php
+++ b/doc/compile.php
@@ -6,14 +6,14 @@ echo "
THIS FILE IS DEPRECATED. DON'T LINK TO IT.
Basics
Platform-specific cookbooks
- Building BOINC on Unix
-
- Building BOINC and BOINC applications on Mac OS X
+
- Building BOINC and BOINC applications on Mac OS X
- Building BOINC applications on Windows
- Building BOINC and BOINC Applications on Linux
- Linux install notes (out of date).
diff --git a/doc/configuration.php b/doc/configuration.php
index 19a3c37755..8de230195d 100644
--- a/doc/configuration.php
+++ b/doc/configuration.php
@@ -2,7 +2,7 @@
require_once("docutil.php");
-page_head("The project configuration file");
+page_head("The project configuration file [deprecated - wiki]");
echo "\n";
echo"
diff --git a/doc/files.php b/doc/files.php
index a8f921bb17..63288488d9 100644
--- a/doc/files.php
+++ b/doc/files.php
@@ -1,6 +1,6 @@
Files and data servers
diff --git a/doc/graphics.php b/doc/graphics.php
index 10bbc525bf..f6c1c3ea40 100644
--- a/doc/graphics.php
+++ b/doc/graphics.php
@@ -1,6 +1,6 @@
BOINC applications can optionally provide graphics,
diff --git a/doc/intro.php b/doc/intro.php
index 1bbbe1b42d..247ceeb341 100644
--- a/doc/intro.php
+++ b/doc/intro.php
@@ -1,6 +1,6 @@
BOINC is a software platform for distributed computing
diff --git a/doc/make_project.php b/doc/make_project.php
index 48a040ad71..bb72b356ed 100644
--- a/doc/make_project.php
+++ b/doc/make_project.php
@@ -1,6 +1,6 @@
The make_project
script creates
diff --git a/doc/platform.php b/doc/platform.php
index 0185caf33f..5402225b20 100644
--- a/doc/platform.php
+++ b/doc/platform.php
@@ -1,6 +1,6 @@
The computers available to a volunteer computing project
diff --git a/doc/project_cookbook.php b/doc/project_cookbook.php
index 595e0f4582..5149b0a3de 100644
--- a/doc/project_cookbook.php
+++ b/doc/project_cookbook.php
@@ -4,7 +4,7 @@ page_head("Project creation cookbook");
echo "
Make skeletal project
-- Install and configure all prerequisite software
+
- Install and configure all prerequisite software
(follow the directions carefully).
Make sure MySQL is configured and running.
- Get the BOINC software,
diff --git a/doc/project_options.php b/doc/project_options.php
index 5bd981ea56..c440a3807e 100644
--- a/doc/project_options.php
+++ b/doc/project_options.php
@@ -1,7 +1,7 @@
";
diff --git a/doc/python.php b/doc/python.php
index 3d732910b1..2ac46cf2bc 100644
--- a/doc/python.php
+++ b/doc/python.php
@@ -3,7 +3,7 @@ require_once("docutil.php");
page_head("Python scripting framework");
echo "
-See the section on Python in the Software Prerequisites.
+See the section on Python in the Software Prerequisites.
Structure
diff --git a/doc/recruit.php b/doc/recruit.php
index 14649f9af9..ac0fc9d463 100644
--- a/doc/recruit.php
+++ b/doc/recruit.php
@@ -1,6 +1,6 @@
Contents
diff --git a/doc/redundancy.php b/doc/redundancy.php
index 8754f188ac..78de5cf0bd 100644
--- a/doc/redundancy.php
+++ b/doc/redundancy.php
@@ -1,6 +1,6 @@
Software Prerequisites.
+See the section on testing in Software Prerequisites.
Note that a web server with PHP is required for
running a real server, but that requires a lot of path and permissions
configuration so we opt not to use them in testing.
diff --git a/html/inc/translation.inc b/html/inc/translation.inc
index 36f47b27be..f017906ae0 100644
--- a/html/inc/translation.inc
+++ b/html/inc/translation.inc
@@ -288,6 +288,7 @@ function parseLanguage($file, $interface){
}
$translation_file = file($file);
$first_entry = true;
+ $current_token_text="";
for ($i = 0;$iuotd_time);
diff --git a/html/ops/update_forum_activities.php b/html/ops/update_forum_activities.php
index e704dd2221..f7019aadef 100755
--- a/html/ops/update_forum_activities.php
+++ b/html/ops/update_forum_activities.php
@@ -7,6 +7,8 @@ define('MAX_REWARD', 4096);
define('SCALAR', 0.9);
set_time_limit(0);
+echo date(DATE_RFC822), ": Starting\n";
+
db_init();
$now = time();
@@ -37,6 +39,7 @@ while ($thread = mysql_fetch_object($result)) {
}
+echo date(DATE_RFC822), ": Finished\n";
?>
diff --git a/lib/boinc_cmd.C b/lib/boinc_cmd.C
index e65bdcca93..c9ecf93008 100644
--- a/lib/boinc_cmd.C
+++ b/lib/boinc_cmd.C
@@ -61,36 +61,40 @@ void version(){
}
void help() {
- fprintf(stderr, "\n\n\
- usage: boinc_cmd [--host hostname] [--passwd passwd] command\n\n\
+ fprintf(stderr, "\n\
+usage: boinc_cmd [--host hostname] [--passwd passwd] command\n\n\
Commands:\n\
- --get_state show entire state\n\
- --get_results show results\n\
- --get_file_transfers show file transfers\n\
- --get_project_status show status of all attached projects\n\
- --get_simple_gui_info show status of projects and active results\n\
- --get_disk_usage\n\
- --result url result_name {suspend | resume | abort | graphics_window | graphics_fullscreen}\n\
- --project url {reset | detach | update | suspend | resume | nomorework | allowmorework}\n\
- --project_attach url auth\n\
- --file_transfer url filename {retry | abort}\n\
- --set_run_mode {always | auto | never} duration\n\
- --set_network_mode {always | auto | never} duration\n\
+ --get_state show entire state\n\
+ --get_results show results\n\
+ --get_file_transfers show file transfers\n\
+ --get_project_status show status of all attached projects\n\
+ --get_simple_gui_info show status of projects and active results\n\
+ --get_disk_usage show disk usage\n\
+ --result url result_name op job operation\n\
+ op = suspend | resume | abort | graphics_window | graphics_fullscreen\n\
+ --project url op project operation\n\
+ op = reset | detach | update | suspend | resume | nomorework | allowmorework\n\
+ --project_attach url auth attach to project\n\
+ --file_transfer url filename op file transfer operation\n\
+ op = retry | abort\n\
+ --set_run_mode mode duration set run mode for given duration\n\
+ mode = always | auto | never\n\
+ --set_network_mode mode duration\n\
--get_proxy_settings\n\
--set_proxy_settings\n\
- --get_messages seqno show messages > seqno\n\
+ --get_messages seqno show messages > seqno\n\
--get_host_info\n\
--acct_mgr_rpc url name password\n\
--run_benchmarks\n\
--get_screensaver_mode\n\
- --set_screensaver_mode on|off blank_time {desktop window_station}\n\
+ --set_screensaver_mode on|off blank_time [desktop window_station]\n\
--get_project_config url\n\
--get_project_config_poll\n\
--lookup_account url email passwd\n\
--create_account url email passwd name\n\
--read_cc_config\n\
- --quit\n\
- ");
+ --quit\n"
+);
exit(1);
}
diff --git a/lib/str_util.C b/lib/str_util.C
index 03e5877ca1..f1394d000c 100755
--- a/lib/str_util.C
+++ b/lib/str_util.C
@@ -662,6 +662,7 @@ const char* boincerror(int which_error) {
case ERR_SHMEM_NAME: return "can't get shared mem segment name";
case ERR_NO_NETWORK_CONNECTION: return "no available network connection";
case ERR_IN_PROGRESS: return "operation in progress";
+ case ERR_ACCT_CREATION_DISABLED: return "account creation disabled";
case ERR_ATTACH_FAIL_INIT: return "Couldn't start master page download";
case ERR_ATTACH_FAIL_DOWNLOAD: return "Couldn't download master page";
case ERR_ATTACH_FAIL_PARSE: return "Couldn't parse master page";
diff --git a/py/Boinc/setup_project.py b/py/Boinc/setup_project.py
index 5c23e9479d..18fc660cae 100644
--- a/py/Boinc/setup_project.py
+++ b/py/Boinc/setup_project.py
@@ -365,13 +365,14 @@ def install_boinc_files(dest_dir):
class Project:
def __init__(self,
short_name, long_name,
- project_dir=None,key_dir=None,
+ project_dir=None, key_dir=None,
master_url=None, cgi_url=None,
db_name=None,
production=False
):
init()
+ self.production = production
self.short_name = short_name
self.long_name = long_name or 'Project ' + self.short_name.replace('_',' ').capitalize()
@@ -396,6 +397,7 @@ class Project:
config.show_results = 1
config.sched_debug_level = 3
config.fuh_debug_level = 3
+ config.one_result_per_user_per_wu = 0
config.master_url = master_url or os.path.join(options.html_url , self.short_name , '')
config.download_url = os.path.join(config.master_url, 'download')
@@ -406,11 +408,9 @@ class Project:
config.key_dir = key_dir or os.path.join(self.project_dir , 'keys')
config.app_dir = os.path.join(self.project_dir, 'apps')
if production:
- config.one_result_per_user_per_wu = '1'
config.min_sendwork_interval = 6
self.scheduler_url = os.path.join(config.cgi_url , 'cgi')
-
def dir(self, *dirs):
return apply(os.path.join,(self.project_dir,)+dirs)
@@ -481,17 +481,15 @@ class Project:
self.dir('html/user/server_status.php'))
install(srcdir('html/languages/project_specific_translations/sample_en.po'), self.dir('html/languages/project_specific_translations/en.po'))
install(srcdir('tools/project.xml'), self.dir('project.xml'))
- install(srcdir('test/uc_result'), self.dir('templates/uc_result'))
- install(srcdir('test/uc_wu_nodelete'), self.dir('templates/uc_wu'))
- install(srcdir('tools/create_work_example'), self.dir('bin/create_work_example'))
-
+ if not self.production:
+ install(srcdir('test/uc_result'), self.dir('templates/uc_result'))
+ install(srcdir('test/uc_wu_nodelete'), self.dir('templates/uc_wu'))
my_symlink(self.config.config.download_dir, self.dir('html', 'user', 'download'))
my_symlink('../stats', self.dir('html/user/stats'))
my_symlink('../user_profile', self.dir('html/user/user_profile'))
my_symlink('../user_profile', self.dir('html/user_profile/user_profile'))
-
# Copy the sched server in the cgi directory with the cgi names given
# source_dir/html/user/schedulers.txt
#
diff --git a/sched/sample_assimilator.C b/sched/sample_assimilator.C
index 00b6446021..70b8afdaa0 100644
--- a/sched/sample_assimilator.C
+++ b/sched/sample_assimilator.C
@@ -18,7 +18,7 @@
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// A sample assimilator that:
-// 1) if success, copy the output file to a directory
+// 1) if success, copy the output file(s) to a directory
// 2) if failure, append a message to an error log
#include
@@ -34,29 +34,48 @@
using std::vector;
using std::string;
-FILE* f = 0;
+int write_error(char* p) {
+ static FILE* f = 0;
+ if (!f) {
+ f = fopen("../sample_results/errors", "a");
+ if (!f) return ERR_FOPEN;
+ }
+ fflush(f);
+ return 0;
+}
+
int assimilate_handler(
WORKUNIT& wu, vector& /*results*/, RESULT& canonical_result
) {
int retval;
+ char buf[1024];
+ unsigned int i;
retval = boinc_mkdir("../sample_results");
if (retval) return retval;
if (wu.canonical_resultid) {
- string output_file_path;
+ vector output_file_paths;
char copy_path[256];
- get_output_file_path(canonical_result, output_file_path);
- sprintf(copy_path, "../sample_results/%s", wu.name);
- retval = boinc_copy(output_file_path.c_str(), copy_path);
- if (retval) return retval;
- } else {
- if (!f) {
- f = fopen("../sample_results/errors", "a");
- if (!f) return ERR_FOPEN;
+ get_output_file_paths(canonical_result, output_file_paths);
+ int n = output_file_paths.size();
+ for (i=0; i CUSHION) {
sleep(60);
} else {
- int njobs = (CUSHION-n)/REPLICATION_FACTOR+1;
+ int njobs = (CUSHION-n)/REPLICATION_FACTOR;
log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG,
"Making %d jobs\n", njobs
);
@@ -116,6 +125,10 @@ void main_loop() {
exit(retval);
}
}
+ // Now sleep for a few seconds to let the transitioner
+ // create instances for the jobs we just created.
+ // Otherwise we could end up creating an excess of jobs.
+ sleep(5);
}
}
}
diff --git a/tools/make_project b/tools/make_project
index 7c28721568..364000ecec 100755
--- a/tools/make_project
+++ b/tools/make_project
@@ -35,7 +35,7 @@ Misc options:
--user_name default: $USER (%(USER)s)
--delete_prev_inst delete project-root first (from prev installation)
--drop_db_first drop database first (from prev installation)
- --no_test_app don't install test application
+ --test_app install test application
Dir-options:
--project_root default: HOME/projects/PROJECT
@@ -75,7 +75,7 @@ try:
'help',
'verbose=',
'no_query',
- 'no_test_app',
+ 'test_app',
'user_name=',
'drop_db_first',
'delete_prev_inst',
@@ -97,7 +97,7 @@ except getopt.GetoptError, e:
options.url_base = None
options.no_query = False
-options.no_test_app = False
+options.test_app = False
options.delete_prev_inst = False
for o,a in opts:
@@ -105,7 +105,7 @@ for o,a in opts:
elif o == '-v': options.echo_verbose = 2
elif o == '--verbose': options.echo_verbose = int(a)
elif o == '--no_query': options.no_query = True
- elif o == '--no_test_app': options.no_test_app = True
+ elif o == '--test_app': options.test_app = True
elif o == '--user_name': options.user_name = a
elif o == '--drop_db_first': options.drop_db_first = True
elif o == '--delete_prev_inst': options.delete_prev_inst = True
@@ -206,7 +206,7 @@ project = Project(
cgi_url = options.cgi_url,
key_dir = options.key_dir,
db_name = options.db_name,
- production = 1
+ production = True
)
project.install_project()
@@ -216,7 +216,7 @@ proot = delete_slash(options.project_root)
project.sched_install('feeder')
project.sched_install('transitioner')
project.sched_install('file_deleter')
-if not options.no_test_app:
+if options.test_app:
project.config.daemons.make_node_and_append("daemon").cmd = 'sample_work_generator -d 3'
project.config.daemons.make_node_and_append("daemon").cmd = 'sample_bitwise_validator -d 3 -app uppercase'
project.config.daemons.make_node_and_append("daemon").cmd = 'sample_assimilator -d 3 -app uppercase'
@@ -253,7 +253,7 @@ project.config.write()
print '''Done installing default daemons.'''
# copy the test app if needed
-if not options.no_test_app:
+if options.test_app:
pname = 'i686-pc-linux-gnu'
dname = 'uppercase_1.1_'+pname
ucdir = proot+'/apps/uppercase/'
@@ -262,6 +262,9 @@ if not options.no_test_app:
os.mkdir(ucdir)
os.mkdir(versdir)
shutil.copy('../apps/upper_case', filepath)
+ shutil.copy('uc_result', proot+'/templates/')
+ shutil.copy('uc_wu', proot+'/templates/')
+ shutil.copy('../tools/create_work_example', proot+'/bin/')
httpd_conf_template_filename = os.path.join(
options.project_root,
diff --git a/tools/uc_result b/tools/uc_result
new file mode 100644
index 0000000000..94d5b710f7
--- /dev/null
+++ b/tools/uc_result
@@ -0,0 +1,13 @@
+
+
+
+
+ 5000000
+
+
+
+
+
+ out
+
+
diff --git a/tools/uc_wu b/tools/uc_wu
new file mode 100644
index 0000000000..030ef8dd84
--- /dev/null
+++ b/tools/uc_wu
@@ -0,0 +1,10 @@
+
+ 0
+
+
+
+ 0
+ in
+
+ -cpu_time 10
+