Einstein@Home-specific hack to the locality scheduler. For new

WU, I need to separate two types of 'sticky/report on RPC' files.
One type is used for WU names of the form FILE__ and the others
are auxilliary.  David, after I've talked with you I'll either
generalize this notion or we can eliminate it.

svn path=/trunk/boinc/; revision=9131
This commit is contained in:
Bruce Allen 2005-12-23 04:17:10 +00:00
parent 7eae628fc8
commit cc96fd006a
3 changed files with 47 additions and 2 deletions

View File

@ -14728,3 +14728,18 @@ David 22 Dec 2005
html/inc/
user.inc
team.inc
Bruce 22 Dec 2005
- compile fix to create_work.C
- Einstein@Home-specific hack to the locality scheduler. For new
WU, I need to separate two types of 'sticky/report on RPC' files.
One type is used for WU names of the form FILE__ and the others
are auxilliary. David, after I've talked with you I'll either
generalize this notion or we can eliminate it.
tools/
create_work.C
sched/
server_types.h
sched_locality.C

View File

@ -44,9 +44,19 @@
// returns zero if there is a file we can delete.
//
int delete_file_from_host(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& sreply) {
#ifdef EINSTEIN_AT_HOME
// append the list of deletion candidates to the file list
int ndelete_candidates = (int)sreq.file_delete_candidates.size();
for (int j=0; j<ndelete_candidates; j++) {
FILE_INFO& fi = sreq.file_delete_candidates[j];
sreq.file_infos.push_back(fi);
}
sreq.file_delete_candidates.clear();
#endif
int nfiles = (int)sreq.file_infos.size();
char buf[256];
if (!nfiles) {
double maxdisk=max_allowable_disk(sreq, sreply);
@ -893,6 +903,23 @@ void send_work_locality(
unsigned int seed=time(0)+getpid();
srand(seed);
#ifdef EINSTEIN_AT_HOME
std::vector<FILE_INFO> eah_copy = sreq.file_infos;
sreq.file_infos.clear();
nfiles = (int) eah_copy.size();
for (i=0; i<nfiles; i++) {
if (strncmp("skygrid_", eah_copy[i].name, 8)) {
sreq.file_infos.push_back(eah_copy[i]);
} else {
sreq.file_delete_candidates.push_back(eah_copy[i]);
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
"[HOST#%d]: removing file %s from file_infos list\n", reply.host.id, eah_copy[i].name
);
}
}
#endif
nfiles = (int) sreq.file_infos.size();
for (i=0; i<nfiles; i++)
log_messages.printf(

View File

@ -138,7 +138,10 @@ struct SCHEDULER_REQUEST {
// does NOT contain the full host record.
std::vector<RESULT> results;
std::vector<MSG_FROM_HOST_DESC> msgs_from_host;
std::vector<FILE_INFO> file_infos; // sticky files reported by host
std::vector<FILE_INFO> file_infos; // sticky files reported by host for locality scheduling
#ifdef EINSTEIN_AT_HOME
std::vector<FILE_INFO> file_delete_candidates; // sticky files reported by host, deletion candidates
#endif
std::vector<OTHER_RESULT> other_results;
std::vector<IP_RESULT> ip_results;
bool have_other_results_list;