diff --git a/apps/upper_case.C b/apps/upper_case.C index f83f560ef1..495cfb202a 100755 --- a/apps/upper_case.C +++ b/apps/upper_case.C @@ -28,7 +28,7 @@ // NOTE: this is NOT a sample BOINC application. // Look in boinc_samples/uppercase for that. // This is a bare-bones application (no graphics) -// that's used by the test_uc.py script. +// that's used for testing and as a placeholder. #ifdef _WIN32 #include "boinc_win.h" diff --git a/checkin_notes b/checkin_notes index f5dca467ca..e6d1ef24bd 100755 --- a/checkin_notes +++ b/checkin_notes @@ -3770,3 +3770,22 @@ Rom 19 Apr 2007 cpp.h cs_scheduler.C +David 19 Apr 2007 + - Change things so that make_project installs a test application + (uppercase) and the daemons to go along with it + (sample_work_generator, sample_bitwise_validator, sample_assimilator). + This is mostly working, not completely. + + apps + upper_case.C + html/ops/ + mass_email_script.php + py/Boinc/ + setup_project.py + sched/ + sched_config.C,h + sample_work_generator.C + tools/ + make_project + project.xml + Makefile.am diff --git a/doc/file_deleter.php b/doc/file_deleter.php index bbe884085d..d656925f24 100644 --- a/doc/file_deleter.php +++ b/doc/file_deleter.php @@ -42,6 +42,10 @@ list_item( return work really late after the deadline -- so late that the corresponding WU has been deleted from the database." ); +list_item( + "-dont_delete_batches", + "If this boolean is set, the file deleter won't delete any files for which the corresponding workunit or result record has a positive value of the the 'batch' field. This lets you keep files on disk until you're done with them. Create workunits with a positive batch number, and zero out (or negate) the batch number when you're done looking at the files (you can do this with a SQL query). If you use this option, replace the indices on file_delete_state with indices on (file_delete_state, batch)." +); list_end(); echo " diff --git a/html/ops/mass_email_script.php b/html/ops/mass_email_script.php index adef10c912..52b6e31a1a 100644 --- a/html/ops/mass_email_script.php +++ b/html/ops/mass_email_script.php @@ -217,33 +217,28 @@ function main($email_files) { $f = fopen($mass_email_log, 'a'); $n = 10; if ($id_file == "") { - while (1) { - $new_startid = do_batch($email_files, $startid, $n, $f); - if ($new_startid == $startid) break; - $startid = $new_startid; - } + while (1) { + $new_startid = do_batch($email_files, $startid, $n, $f); + if ($new_startid == $startid) break; + $startid = $new_startid; + } } else { - $fid = fopen($id_file, 'r'); - if (!$fid) { - echo $id_file . ' not found - create id list and run again\n'; - exit(); - } - $thisid = 0; - while (fscanf($fid, '%d', &$thisid)) { - if ($thisid > $startid) { - do_one($email_files, $thisid, $f); - } - } - fclose($fid); - - + $fid = fopen($id_file, 'r'); + if (!$fid) { + echo $id_file . ' not found - create id list and run again\n'; + exit(); + } + $thisid = 0; + while (fscanf($fid, '%d', &$thisid)) { + if ($thisid > $startid) { + do_one($email_files, $thisid, $f); + } + } + fclose($fid); } echo 'All done!' . "\n"; } -function test($email_files) { -} - if (!$USE_PHPMAILER) { echo "You must use PHPMailer.\n"; exit(); diff --git a/py/Boinc/setup_project.py b/py/Boinc/setup_project.py index 066544d635..5c23e9479d 100644 --- a/py/Boinc/setup_project.py +++ b/py/Boinc/setup_project.py @@ -343,6 +343,7 @@ def install_boinc_files(dest_dir): [ 'make_work', 'feeder', 'transitioner', 'sample_bitwise_validator', 'sample_trivial_validator', 'file_deleter', 'sample_dummy_assimilator', + 'sample_assimilator', 'sample_work_generator', 'update_stats', 'db_dump', 'db_purge' ]) map(lambda (s): install(srcdir('sched',s), dir('bin',s)), [ 'start', 'show_shmem' ]) diff --git a/sched/sample_work_generator.C b/sched/sample_work_generator.C index bca5acec20..e842b7f23c 100644 --- a/sched/sample_work_generator.C +++ b/sched/sample_work_generator.C @@ -56,6 +56,7 @@ int make_job() { DB_WORKUNIT wu; char name[256], path[256], buf[256]; const char* infiles[1]; + int retval; // make a unique name (for the job and its input file) // @@ -64,7 +65,8 @@ int make_job() { // Create the input file. // Put it at the right place in the download dir hierarchy // - config.download_path(name, path); + retval = config.download_path(name, path); + if (retval) return retval; FILE* f = fopen(path, "w"); if (!f) return ERR_FOPEN; fprintf(f, "This is the input file for job %s", name); @@ -76,15 +78,15 @@ int make_job() { wu.appid = app.id; strcpy(wu.name, name); wu.target_nresults = REPLICATION_FACTOR; - infiles[0] = path; + infiles[0] = name; // Register the job with BOINC // return create_work( wu, wu_template, - "result_uppercase.xml", - "../templates/results_uppercase.xml", + "uc_result", + "../templates/uc_result", infiles, 1, config @@ -101,9 +103,17 @@ void main_loop() { if (n > CUSHION) { sleep(60); } else { - int njobs = n/REPLICATION_FACTOR; + int njobs = (CUSHION-n)/REPLICATION_FACTOR+1; + log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG, + "Making %d jobs\n", njobs + ); for (int i=0; i> /etc/apache/httpd.conf && apachectl restart @@ -263,19 +284,26 @@ Steps to complete installation: 0,5,10,15,20,25,30,35,40,45,50,55 * * * * %(proot)s/bin/start --cron -To start, show status, stop BOINC daemons run: +3. The project is configured with a test application. + To install this application (recommended) run: + cd %(proot)s + bin/xadd + bin/update_versions - %(proot)s/bin/start - %(proot)s/bin/status - %(proot)s/bin/stop +To start, show status, and stop the project, run: + bin/start + bin/status + bin/stop -Master URL: %(html_user_url)s -Administration URL: %(html_ops_url)s +The project's URLs are: +Home page (and master URL): %(html_user_url)s +Administrative page: %(html_ops_url)s -3. Add Work Generator, Validator and Assimilator daemons for your applications +---------------------------- - -Further steps are necessary to add applications and work. +To use this project for your own computations, you'll need to +- Port your application(s) and add them +- Develop programs to submit and handle jobs See the online documentation at http://boinc.berkeley.edu/ '''%locals() diff --git a/tools/project.xml b/tools/project.xml index d74f9b720d..89a6e58872 100644 --- a/tools/project.xml +++ b/tools/project.xml @@ -3,6 +3,10 @@ windows_intelx86 Microsoft Windows (98 or later) running on an Intel x86-compatible CPU + + windows_x86_64 + Microsoft Windows running on an AMD x86_64 or Intel EM64T CPU + i686-pc-linux-gnu Linux running on an Intel x86-compatible CPU