mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=2859
This commit is contained in:
parent
5f842e6eb6
commit
cc7ff62644
|
@ -9024,3 +9024,9 @@ David 7 Jan 2004
|
|||
|
||||
sched/
|
||||
handle_request.C
|
||||
|
||||
David 7 Jan 2004
|
||||
- added "host delete" function (if host has zero results)
|
||||
|
||||
html_user/
|
||||
host_delete.php (new)
|
||||
|
|
|
@ -100,7 +100,12 @@ function show_host($host, $private, $ipprivate) {
|
|||
row2("% of time host is connected", 100*$host->connected_frac." %");
|
||||
row2("% of time user is active", 100*$host->active_frac." %");
|
||||
row2("Location", location_form($host));
|
||||
row2("Edit", "<a href=host_edit_form.php?hostid=$host->id>Merge this host</a>");
|
||||
if ($nresults == 0) {
|
||||
$x = " | <a href=host_delete.php?hostid=$host->id>Delete this host</a> ";
|
||||
} else {
|
||||
$x = "";
|
||||
}
|
||||
row2("Edit", "<a href=host_edit_form.php?hostid=$host->id>Merge this host</a> $x");
|
||||
}
|
||||
echo "</table>\n";
|
||||
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
require_once("db.inc");
|
||||
require_once("util.inc");
|
||||
require_once("host.inc");
|
||||
|
||||
function fail($msg) {
|
||||
echo "Error: $msg";
|
||||
page_tail();
|
||||
exit();
|
||||
}
|
||||
|
||||
function get_host($hostid, $user) {
|
||||
$host = lookup_host($hostid);
|
||||
if (!$host || $host->userid != $user->id) {
|
||||
fail("No such host");
|
||||
}
|
||||
return $host;
|
||||
}
|
||||
|
||||
db_init();
|
||||
$user = get_logged_in_user();
|
||||
|
||||
page_head("Host delete");
|
||||
|
||||
$hostid = $_GET["hostid"];
|
||||
$host = get_host($hostid, $user);
|
||||
if (host_nresults($host)==0) {
|
||||
mysql_query("delete from host where id=$hostid");
|
||||
} else {
|
||||
fail("existing results");
|
||||
}
|
||||
echo "
|
||||
Host deleted.
|
||||
<p><a href=hosts_user.php>Return to list of your computers</a>
|
||||
";
|
||||
page_tail();
|
||||
|
||||
?>
|
|
@ -35,24 +35,30 @@
|
|||
// When the enumerator reaches the end, it is restarted;
|
||||
// hopefully there will be some new workunits.
|
||||
// There are two complications:
|
||||
//
|
||||
// - An enumeration may return results already in the array.
|
||||
// So, for each result, we scan the entire array to make sure
|
||||
// it's not there already. Can this be streamlined?
|
||||
//
|
||||
// - We must avoid excessive re-enumeration,
|
||||
// especially when the number of results is less than the array size.
|
||||
// Crude approach: if a "collision" (as above) occurred on
|
||||
// a pass through the array, wait a long time (5 sec)
|
||||
//
|
||||
// Checking for infeasible results (i.e. can't sent to any host):
|
||||
//
|
||||
// - the "infeasible_count" field of WU_RESULT keeps track of
|
||||
// how many times the WU_RESULT was infeasible for a host
|
||||
//
|
||||
// - the scheduler gives priority to results that have infeasible_count > 0
|
||||
//
|
||||
// - If the infeasible_count of any result exceeds MAX_INFEASIBLE_COUNT,
|
||||
// the feeder flags the result as OVER with outcome COULDNT_SEND,
|
||||
// and flags the WU for the transitioner.
|
||||
//
|
||||
// - the feeder tries to ensure that the number of WU_RESULTs
|
||||
// with infeasible_count > 0 doesn't exceed MAX_INFEASIBLE
|
||||
// (compiled into feeder).
|
||||
// with infeasible_count > MAX_INFEASIBLE_THRESHOLD
|
||||
// doesn't exceed MAX_INFEASIBLE (defined in sched_shmem.h)
|
||||
// If it does, then the feeder picks the WU_RESULT with
|
||||
// the largest infeasible_count, marks if COULDNT_SEND as above,
|
||||
// and repeats this until the infeasible count is low enough again
|
||||
|
@ -169,7 +175,7 @@ static void scan_work_array(
|
|||
if (wu_result.present) {
|
||||
if (wu_result.infeasible_count > MAX_INFEASIBLE_COUNT) {
|
||||
remove_infeasible(i);
|
||||
} else if (wu_result.infeasible_count > 0) {
|
||||
} else if (wu_result.infeasible_count > MAX_INFEASIBLE_THRESHOLD) {
|
||||
ninfeasible++;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -47,6 +47,8 @@ const int MAX_WUS_TO_SEND = 10;
|
|||
|
||||
const double COBBLESTONE_FACTOR = 300.0;
|
||||
|
||||
const double MIN_POSSIBLE_RAM = 64000000;
|
||||
|
||||
struct WORK_REQ {
|
||||
bool infeasible_only;
|
||||
double seconds_to_fill;
|
||||
|
@ -137,10 +139,13 @@ inline double estimate_wallclock_duration(WORKUNIT& wu, HOST& host) {
|
|||
// return true if the WU can be executed on the host
|
||||
//
|
||||
bool wu_is_feasible(WORKUNIT& wu, HOST& host, WORK_REQ& wreq) {
|
||||
if (host.m_nbytes && wu.rsc_memory_bound > host.m_nbytes) {
|
||||
double m_nbytes = host.m_nbytes;
|
||||
if (m_nbytes < MIN_POSSIBLE_RAM) m_nbytes = MIN_POSSIBLE_RAM;
|
||||
|
||||
if (wu.rsc_memory_bound > m_nbytes) {
|
||||
log_messages.printf(
|
||||
SchedMessages::DEBUG, "[WU#%d %s] needs %f mem; [HOST#%d] has %f\n",
|
||||
wu.id, wu.name, wu.rsc_memory_bound, host.id, host.m_nbytes
|
||||
wu.id, wu.name, wu.rsc_memory_bound, host.id, m_nbytes
|
||||
);
|
||||
wreq.insufficient_mem = true;
|
||||
return false;
|
||||
|
@ -719,7 +724,7 @@ static void scan_work_array(
|
|||
continue;
|
||||
}
|
||||
|
||||
if (wreq.infeasible_only && wu_result.infeasible_count==0) {
|
||||
if (wreq.infeasible_only && (wu_result.infeasible_count==0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,9 +26,11 @@
|
|||
#define MAX_APPS 10
|
||||
#define MAX_APP_VERSIONS 1000
|
||||
#define MAX_WU_RESULTS 1000
|
||||
#define MAX_INFEASIBLE_THRESHOLD 20
|
||||
#define MAX_INFEASIBLE 500
|
||||
// if # of elements in work array that were infeasible for some host
|
||||
// exceeds this, classify some of them as COULDNT_SEND
|
||||
// if # of elements in work array that were infeasible
|
||||
// for at least MAX_INFEASIBLE_THRESHOLD hosts exceeds this,
|
||||
// classify some of them as COULDNT_SEND
|
||||
|
||||
// a workunit/result pair
|
||||
struct WU_RESULT {
|
||||
|
|
Loading…
Reference in New Issue