*** empty log message ***

svn path=/trunk/boinc/; revision=2995
This commit is contained in:
David Anderson 2004-02-17 02:16:53 +00:00
parent 4eae25b461
commit 13215f88cd
10 changed files with 128 additions and 38 deletions

2
aclocal.m4 vendored
View File

@ -1104,7 +1104,7 @@ AC_DEFUN([SAH_HEADER_STDCXX],[
#
# Revision Log:
# $Log$
# Revision 1.67 2004/02/06 23:46:26 davea
# Revision 1.68 2004/02/17 02:16:51 boincadm
# *** empty log message ***
#
# Revision 1.1 2003/12/11 18:38:24 korpela

View File

@ -10047,3 +10047,29 @@ David Feb 15 2004
py/Boinc/
database.py
setup_project.py
David Feb 16 2004
- enable the min_core_version attribute of app_version:
don't send a result to a host whose core version is too low.
(Note: this is a no-op unless you set min_core_version
to something nonzero).
If a host isn't sent any work because of this,
send a message suggesting upgrade
- In the scheduler, parse <exit_status> from within <result>
Also parse it within <stderr_out> for backwards compat
- put an <exit_status> element at the top level of <result>,
not within <stderr_out>
- add uniqueness constraints for category and forum
- add a script to set up initial categories and forums
client/
client_state.C
client_types.C
db/
constraints.sql
html/ops/
create_forums.php (new)
sched/
handle_request.C
sched_shmem.C
server_types.C

View File

@ -920,11 +920,9 @@ int CLIENT_STATE::report_result_error(
buf,
"<message>%s\n</message>\n"
"<active_task_state>%d</active_task_state>\n"
"<exit_status>%d</exit_status>\n"
"<signal>%d</signal>\n",
err_msg,
res.active_task_state,
res.exit_status,
res.signal
);
res.stderr_out.append(buf);

View File

@ -940,9 +940,11 @@ int RESULT::write(FILE* out, bool to_server) {
"<result>\n"
" <name>%s</name>\n"
" <final_cpu_time>%f</final_cpu_time>\n"
" <exit_status>%d</exit_status>\n"
" <state>%d</state>\n",
name,
final_cpu_time,
exit_status,
state
);
n = stderr_out.length();

2
configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.ac Revision: 1.73 .
# From configure.ac Revision: 1.74 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57 for BOINC 2.25.
#

View File

@ -98,6 +98,12 @@ alter table profile
alter table subscriptions
add unique sub_unique(userid, threadid);
alter table category
add unique cat1(name, is_helpdesk);
alter table forum
add unique(category, title);
alter table thread
add fulltext index thread_title(title);

View File

@ -0,0 +1,34 @@
<?
require_once("../inc/db.inc");
db_init();
function create_category($orderID, $name, $is_helpdesk) {
$q = "insert into category (orderID, lang, name, is_helpdesk) values ($orderID, 1, '$name', $is_helpdesk)";
$result = mysql_query($q);
if (!$result) {
echo "can't create category\n";
echo mysql_error();
exit();
}
return mysql_insert_id();
}
function create_forum($category, $orderID, $title, $description) {
$q = "insert into forum (category, orderID, title, description) values ($category, $orderID, '$title', '$description')";
$result = mysql_query($q);
if (!$result) {
echo "can't create forum\n";
echo mysql_error();
exit();
}
return mysql_insert_id();
}
$catid = create_category(0, "General", 0);
create_forum($catid, 0, "General", "General discussion");
$catid = create_category(0, "General", 1);
create_forum($catid, 0, "General", "General questions");
?>

View File

@ -53,6 +53,7 @@ struct WORK_REQ {
double seconds_to_fill;
double disk_available;
int nresults;
int core_client_version;
// the following flags are set whenever a result is infeasible;
// used to construct explanatory message to user
@ -61,6 +62,7 @@ struct WORK_REQ {
bool insufficient_mem;
bool insufficient_speed;
bool no_app_version;
bool outdated_core;
};
bool anonymous(PLATFORM& platform) {
@ -253,6 +255,21 @@ bool find_app_version(
return true;
}
// verify that the given APP_VERSION will work with the core client
//
bool app_core_compatible(WORK_REQ& wreq, APP_VERSION& av) {
if (wreq.core_client_version < av.min_core_version) {
log_messages.printf(
SchedMessages::DEBUG,
"Outdated core version: wanted %d, got %d\n",
av.min_core_version, wreq.core_client_version
);
wreq.outdated_core = true;
return false;
}
return true;
}
// add the given workunit to a reply.
// look up its app, and make sure there's a version for this platform.
// Add the app and app_version to the reply also.
@ -761,34 +778,6 @@ static void scan_work_array(
continue;
}
// don't send if we've already sent a result of this WU to this user
//
if (config.one_result_per_user_per_wu) {
sprintf(buf,
"where workunitid=%d and userid=%d",
wu_result.workunit.id, reply.user.id
);
retval = result.count(n, buf);
if (retval) {
log_messages.printf(
SchedMessages::CRITICAL,
"send_work: can't get result count (%d)\n", retval
);
continue;
} else {
if (n>0) {
#if 0
log_messages.printf(
SchedMessages::NORMAL,
"send_work: user %d already has %d result(s) for WU %d\n",
reply.user.id, n, wu_result.workunit.id
);
#endif
continue;
}
}
}
// don't send if host can't handle it
//
wu = wu_result.workunit;
@ -817,6 +806,39 @@ static void scan_work_array(
wu_result.infeasible_count++;
continue;
}
if (!app_core_compatible(wreq, *avp)) {
wu_result.infeasible_count++;
continue;
}
}
// Don't send if we've already sent a result of this WU to this user.
// NOTE: do this check last since it involves a DB access
//
if (config.one_result_per_user_per_wu) {
sprintf(buf,
"where workunitid=%d and userid=%d",
wu_result.workunit.id, reply.user.id
);
retval = result.count(n, buf);
if (retval) {
log_messages.printf(
SchedMessages::CRITICAL,
"send_work: can't get result count (%d)\n", retval
);
continue;
} else {
if (n>0) {
#if 0
log_messages.printf(
SchedMessages::NORMAL,
"send_work: user %d already has %d result(s) for WU %d\n",
reply.user.id, n, wu_result.workunit.id
);
#endif
continue;
}
}
}
result = wu_result.result;
@ -901,6 +923,8 @@ int send_work(
wreq.insufficient_mem = false;
wreq.insufficient_speed = false;
wreq.no_app_version = false;
wreq.core_client_version = sreq.core_client_major_version*100
+ sreq.core_client_minor_version;
wreq.nresults = 0;
log_messages.printf(
@ -954,6 +978,11 @@ int send_work(
" (there was work but your computer would not finish it before it is due"
);
}
if (wreq.outdated_core) {
strcat(reply.message,
" (your core client is out of date - please upgrade)"
);
}
strcpy(reply.message_priority, "low");
reply.request_delay = 10;

View File

@ -139,11 +139,5 @@ APP_VERSION* SCHED_SHMEM::lookup_app_version(
}
}
// log_messages.printf(
// SchedMessages::DEBUG,
// "SCHED_SHMEM::lookup_app_version(appid=%d, platformid=%d, min_version=%d): best_avp=%d\n",
// appid, platformid, min_version,
// best_version);
return best_avp;
}

View File

@ -359,6 +359,7 @@ int RESULT::parse_from_client(FILE* fin) {
else if (parse_str(buf, "<name>", name, sizeof(name))) continue;
else if (parse_int(buf, "<state>", client_state)) continue;
else if (parse_double(buf, "<final_cpu_time>", cpu_time)) continue;
else if (parse_int(buf, "<exit_status>", exit_status)) continue;
else if (match_tag(buf, "<file_info>")) {
safe_strcat(xml_doc_out, buf);
while (fgets(buf, 256, fin)) {