*** empty log message ***

svn path=/trunk/boinc/; revision=5506
This commit is contained in:
David Anderson 2005-02-23 19:44:59 +00:00
parent 8721cee6c5
commit 29e77cf1f0
8 changed files with 38 additions and 134 deletions

View File

@ -25216,3 +25216,23 @@ David 22 Feb 2005
scheduler_op.C
sched/
sched_send.C
David 23 Feb 2005
- got test_uc.py to work again - woohoo!
- changed WU name to uc_wu_nodelete.
Otherwise the input file would get deleted
and subsequent WUs (created by make_work) would bomb out
- change make_work to strictly obey its max_wus argument.
- remove check that original input file is deleted, 'cuz it's not.
py/Boinc/
setup_project.py
sched/
make_work.C
test/
make_project_ap.php (removed)
test_backend.py (removed)
test_uc.py
testbase.py
uc_wu (removed)
uc_wu_nodelete (new)

View File

@ -540,9 +540,7 @@ class Project:
_check_vars(kwargs)
elif progname == 'make_work':
work = kwargs.get('work', self.work)
_check_vars(kwargs, cushion=30, max_wus=0, min_quorum=None,
result_template=os.path.realpath(work.result_template),
wu_name=work.wu_template)
_check_vars(kwargs, cushion=30, max_wus=0, wu_name=work.wu_template)
elif progname == 'sample_bitwise_validator':
_check_vars(kwargs)
each_app = True

View File

@ -243,12 +243,21 @@ void make_work() {
continue;
}
// decide how many WUs to create based on cushion
// and (if present) max_wus
//
int nwus = (cushion-unsent_results)/wu.target_nresults+1;
if (max_wus) {
int mwlimit = max_wus - total_wus;
if (nwus > mwlimit) nwus = mwlimit;
}
for (int i=0; i<nwus; i++) {
make_new_wu(wu, starting_xml, start_time, seqno, config);
}
// now wait a while for the transitioner to make results
// wait a while for the transitioner to make results
//
sleep(60);
}
}
@ -269,6 +278,10 @@ int main(int argc, char** argv) {
strcpy(wu_name, argv[++i]);
} else if (!strcmp(argv[i], "-max_wus")) {
max_wus = atoi(argv[++i]);
} else {
log_messages.printf(
SCHED_MSG_LOG::CRITICAL, "unknown argument: %s\n", argv[i]
);
}
}

View File

@ -1,69 +0,0 @@
#!/bin/sh
echo "this file is obsolete! cvs remove when ready"
exit 1
#! /usr/local/bin/php
<?php
// This script creates a BOINC project.
// You just need to plug in an application,
// and back-end systems for creating work and validating results
include_once("test.inc");
$project = new Project;
$project->short_name = "apt";
$project->long_name = "Astropulse";
// Solaris version
$platform_sol = new Platform("sparc-sun-solaris2.7", "Solaris");
$app = new App("Astropulse");
$app_version_sol = new App_Version($app);
$app_version_sol->platform = $platform_sol;
$app_version_sol->exec_dir = "../apps";
$app_version_sol->version = 9;
$app_version_sol->exec_name = "ap_sparc_0.09";
// Linux version
$platform_lin = new Platform("i686-pc-linux-gnu", "Linux");
$app_version_lin = new App_Version($app);
$app_version_lin->platform = $platform_lin;
$app_version_lin->exec_dir = "../apps";
$app_version_lin->version = 9;
$app_version_lin->exec_name = "ap_linux_0.09";
/*
$core_app = new App("core client");
$core_app_version = new App_Version($core_app);
$core_app_version->platform = $platform;
$core_app_version->exec_dir = "../apps";
$core_app_version->version = 13;
$core_app_version->exec_name = "BOINC_0.13a.exe";
*/
$project->add_app($app);
$project->add_app_version($app_version_sol);
$project->add_app_version($app_version_lin);
//$project->add_app($core_app);
//$project->add_app_version($core_app_version);
$project->shmem_key = 0x3141a666;
$project->project_php_file = "project_ap.inc";
$project->project_prefs_php_file = "project_specific_prefs_ap.inc";
$project->install();
$project->install_feeder();
$project->install_assimilator($app);
$project->install_file_delete();
$project->install_validate($app,3);
$project->start_servers();
/*$work = new Work($app);
$work->wu_template = "pulse_wu";
$work->result_template = "pulse_result";
$work->redundancy = 5;
array_push($work->input_files, "03au00ab_20575_00000.wu");
$work->install($project);*/
?>

View File

@ -1,58 +0,0 @@
#!/bin/sh
echo 'this file is obsolete. remove from cvs when ready.'
exit 1
#!/usr/bin/env python
## $Id$
# End to end test. Tests make_work, feeder, scheduling server, client,
# file_upload_handler, validator, assimilator, transitioner, and file_deleter
# on a large batch of workunits. Confirms that credit is correctly granted
# and that unneeded files are deleted
from test_uc import *
import time, os
class ProjectBackend(ProjectUC):
def __init__(self, num_wu, redundancy):
self.num_wu = num_wu
ProjectUC.__init__(self, redundancy = redundancy, short_name = 'test_backend')
def run(self):
self.install()
self.sched_install('make_work', max_wus = self.num_wu)
self.sched_install('assimilator')
self.sched_install('file_deleter')
self.sched_install('validate_test')
self.sched_install('feeder')
self.sched_install('transitioner')
self.start_servers()
db = self.db_open()
while True:
wus_assimilated = num_wus_assimilated(db)
verbose_echo(1, "Running: WUs [%dassim/%dtotal/%dtarget] Results: [%dunsent,%dinProg,%dover/%dtotal]" % (
wus_assimilated, num_wus(db), num_wu,
num_results_unsent(db),
num_results_in_progress(db),
num_results_over(db),
num_results(db)))
if wus_assimilated >= num_wu:
break
time.sleep(.1)
db.close()
def check(self):
self.check_results(ResultUC(), self.num_wu*redundancy)
if __name__ == '__main__':
num_wu = sys.argv[1:] and get_int(sys.argv[1]) or 100
redundancy = sys.argv[2:] and get_int(sys.argv[2]) or 5
test_msg("entire backend (with %d workunits * %d results each)" % (num_wu, redundancy));
ProjectBackend(num_wu = num_wu, redundancy = redundancy)
run_check_all()

View File

@ -31,7 +31,7 @@ foobar
class WorkUC(Work):
def __init__(self, redundancy, **kwargs):
Work.__init__(self, redundancy=redundancy)
self.wu_template = "uc_wu"
self.wu_template = "uc_wu_nodelete"
self.result_template = "uc_result"
self.input_files = ['input']
self.__dict__.update(kwargs)

View File

@ -338,7 +338,7 @@ class TestProject(Project):
self.install_hosts()
def run(self):
self.sched_install('make_work', max_wus = self.num_wu, min_quorum = self.redundancy)
self.sched_install('make_work', max_wus = self.num_wu)
self.sched_install('sample_dummy_assimilator')
self.sched_install('file_deleter')
self.sched_install('sample_bitwise_validator')
@ -365,7 +365,7 @@ class TestProject(Project):
# TODO: self.check_outputs(output_expected, ZZZ, YYY)
self.check_results(self.expected_result, self.num_wu*self.redundancy)
self.sched_run('file_deleter')
self.check_deleted("download/input")
# self.check_deleted("download/input")
# TODO: use generator/iterator whatever to check all files deleted
# self.check_deleted("upload/uc_wu_%d_0", count=self.num_wu)