mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=4182
This commit is contained in:
parent
a66caa800f
commit
e01aa9de45
|
@ -1106,7 +1106,7 @@ AC_DEFUN([SAH_HEADER_STDCXX],[
|
|||
#
|
||||
# Revision Log:
|
||||
# $Log$
|
||||
# Revision 1.144 2004/09/04 23:42:25 davea
|
||||
# Revision 1.145 2004/09/10 21:02:04 davea
|
||||
# *** empty log message ***
|
||||
#
|
||||
# Revision 1.1 2003/12/11 18:38:24 korpela
|
||||
|
|
|
@ -17270,3 +17270,17 @@ David 10 Sept 2004
|
|||
|
||||
sched/
|
||||
validator.C
|
||||
|
||||
David 10 Sept 2004
|
||||
- more changes for locality scheduling
|
||||
|
||||
client/
|
||||
client_state.C
|
||||
client_types.C
|
||||
cs_scheduler.C
|
||||
sched/
|
||||
Makefile.am
|
||||
sched_config.C,h
|
||||
sched_locality.h (new)
|
||||
sched_send.C
|
||||
server_types.C,h
|
||||
|
|
|
@ -776,7 +776,7 @@ bool CLIENT_STATE::garbage_collect() {
|
|||
*rp, 0, "WU download error: %s", error_msgs.c_str()
|
||||
);
|
||||
} else if (wup->avp && wup->avp->had_failure(failnum)) {
|
||||
avp->get_file_errors(error_msgs);
|
||||
wup->avp->get_file_errors(error_msgs);
|
||||
report_result_error(
|
||||
*rp, 0, "app_version download error: %s", error_msgs.c_str()
|
||||
);
|
||||
|
|
|
@ -481,12 +481,12 @@ char* PROJECT::get_project_name() {
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
// comment? what does this do?
|
||||
// Does it do a lot of disk access to do it??
|
||||
//
|
||||
bool PROJECT::associate_file(FILE_INFO* fip) {
|
||||
return 0;
|
||||
#if 0
|
||||
double space_made = 0;
|
||||
if (gstate.get_more_disk_space(this, fip->nbytes)) {
|
||||
size += fip->nbytes;
|
||||
|
@ -501,8 +501,8 @@ bool PROJECT::associate_file(FILE_INFO* fip) {
|
|||
} else {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
int APP::parse(MIOFILE& in) {
|
||||
char buf[256];
|
||||
|
@ -541,6 +541,7 @@ FILE_INFO::FILE_INFO() {
|
|||
uploaded = false;
|
||||
upload_when_present = false;
|
||||
sticky = false;
|
||||
report_on_rpc = false;
|
||||
signature_required = false;
|
||||
is_user_file = false;
|
||||
pers_file_xfer = NULL;
|
||||
|
@ -667,6 +668,7 @@ int FILE_INFO::parse(MIOFILE& in, bool from_server) {
|
|||
else if (match_tag(buf, "<uploaded/>")) uploaded = true;
|
||||
else if (match_tag(buf, "<upload_when_present/>")) upload_when_present = true;
|
||||
else if (match_tag(buf, "<sticky/>")) sticky = true;
|
||||
else if (match_tag(buf, "<report_on_rpc/>")) report_on_rpc = true;
|
||||
else if (match_tag(buf, "<signature_required/>")) signature_required = true;
|
||||
#if 0
|
||||
else if (parse_int(buf, "<time_last_used>", (int&)time_last_used)) continue;
|
||||
|
@ -729,6 +731,7 @@ int FILE_INFO::write(MIOFILE& out, bool to_server) {
|
|||
if (uploaded) out.printf(" <uploaded/>\n");
|
||||
if (upload_when_present) out.printf(" <upload_when_present/>\n");
|
||||
if (sticky) out.printf(" <sticky/>\n");
|
||||
if (report_on_rpc) out.printf(" <report_on_rpc/>\n");
|
||||
if (signature_required) out.printf(" <signature_required/>\n");
|
||||
if (strlen(file_signature)) out.printf(" <file_signature>\n%s</file_signature>\n", file_signature);
|
||||
#if 0
|
||||
|
|
|
@ -288,6 +288,7 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p, double work_req) {
|
|||
fprintf(f,
|
||||
" <file_info>\n"
|
||||
" <name>%s</name>\n"
|
||||
" <report_on_rpc/>\n"
|
||||
" </file_info>\n",
|
||||
fip->name
|
||||
);
|
||||
|
|
|
@ -28,7 +28,8 @@ be granted for correct results for this workunit.
|
|||
<li>
|
||||
If, when an output file for a result has a nonrecoverable error
|
||||
(i.e. the directory is there but the file isn't),
|
||||
then it must set the result's outcome to VALIDATE_ERROR and update the result.
|
||||
then it must set the result's outcome (in memory, not database)
|
||||
to VALIDATE_ERROR.
|
||||
Note: the function try_fopen() (in lib/util.C) can be used
|
||||
to detect recoverable/nonrecoverable errors.
|
||||
<li>
|
||||
|
@ -61,7 +62,8 @@ In the absence of errors,
|
|||
it sets the new result's validate_state to either VALID or INVALID.
|
||||
<li>
|
||||
If it has a nonrecoverable error reading an output file of either result,
|
||||
it must set the new result's outcome to VALIDATE_ERROR and update it.
|
||||
it must set the new result's outcome (in memory, not database)
|
||||
to VALIDATE_ERROR.
|
||||
<li>
|
||||
If it has a recoverable error while reading an output file of either result,
|
||||
it returns retry=true,
|
||||
|
|
|
@ -57,6 +57,7 @@ cgi_SOURCES = \
|
|||
handle_request.C \
|
||||
main.C \
|
||||
sched_send.C \
|
||||
sched_locality.C \
|
||||
server_types.C \
|
||||
../lib/synch.C
|
||||
|
||||
|
|
|
@ -232,6 +232,7 @@ cgi_SOURCES = \
|
|||
handle_request.C \
|
||||
main.C \
|
||||
sched_send.C \
|
||||
sched_locality.C \
|
||||
server_types.C \
|
||||
../lib/synch.C
|
||||
|
||||
|
@ -358,7 +359,8 @@ noinst_PROGRAMS = cgi$(EXEEXT) feeder$(EXEEXT) db_dump$(EXEEXT) \
|
|||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
|
||||
am_cgi_OBJECTS = handle_request.$(OBJEXT) main.$(OBJEXT) \
|
||||
sched_send.$(OBJEXT) server_types.$(OBJEXT) synch.$(OBJEXT)
|
||||
sched_send.$(OBJEXT) sched_locality.$(OBJEXT) \
|
||||
server_types.$(OBJEXT) synch.$(OBJEXT)
|
||||
cgi_OBJECTS = $(am_cgi_OBJECTS)
|
||||
cgi_LDADD = $(LDADD)
|
||||
cgi_LDFLAGS =
|
||||
|
@ -486,6 +488,7 @@ am__depfiles_maybe = depfiles
|
|||
@AMDEP_TRUE@ ./$(DEPDIR)/sample_dummy_assimilator.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sample_trivial_validator.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sched_config.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sched_locality.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sched_msgs.Po ./$(DEPDIR)/sched_send.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sched_shmem.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sched_util.Po ./$(DEPDIR)/send_file.Po \
|
||||
|
@ -710,6 +713,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample_dummy_assimilator.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample_trivial_validator.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_config.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_locality.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_msgs.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_send.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_shmem.Po@am__quote@
|
||||
|
|
|
@ -61,6 +61,9 @@ int SCHED_CONFIG::parse(char* buf) {
|
|||
if (match_tag(buf, "<homogeneous_redundancy/>")) {
|
||||
homogeneous_redundancy = true;
|
||||
}
|
||||
if (match_tag(buf, "<locality_scheduling/>")) {
|
||||
locality_scheduling = true;
|
||||
}
|
||||
if (match_tag(buf, "<msg_to_host/>")) {
|
||||
msg_to_host = true;
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ public:
|
|||
int max_wus_to_send;
|
||||
bool non_cpu_intensive;
|
||||
bool homogeneous_redundancy;
|
||||
bool locality_scheduling;
|
||||
bool ignore_upload_certificates;
|
||||
bool enforce_delay_bound;
|
||||
bool deletion_policy_priority;
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
extern void send_work_locality(
|
||||
SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply, PLATFORM& platform,
|
||||
WORK_REQ& wreq, SCHED_SHMEM& ss
|
||||
);
|
|
@ -33,6 +33,7 @@ using namespace std;
|
|||
#include "main.h"
|
||||
#include "sched_msgs.h"
|
||||
#include "sched_send.h"
|
||||
#include "sched_locality.h"
|
||||
|
||||
#ifdef _USING_FCGI_
|
||||
#include "fcgi_stdio.h"
|
||||
|
@ -741,13 +742,18 @@ int send_work(
|
|||
wreq.seconds_to_fill = MIN_SECONDS_TO_SEND;
|
||||
}
|
||||
|
||||
// give priority to results that were infeasible for some other host
|
||||
//
|
||||
wreq.infeasible_only = true;
|
||||
scan_work_array(wreq, sreq, reply, platform, ss);
|
||||
if (config.locality_scheduling) {
|
||||
wreq.infeasible_only = false;
|
||||
send_work_locality(sreq, reply, platform, wreq, ss);
|
||||
} else {
|
||||
// give priority to results that were infeasible for some other host
|
||||
//
|
||||
wreq.infeasible_only = true;
|
||||
scan_work_array(wreq, sreq, reply, platform, ss);
|
||||
|
||||
wreq.infeasible_only = false;
|
||||
scan_work_array(wreq, sreq, reply, platform, ss);
|
||||
wreq.infeasible_only = false;
|
||||
scan_work_array(wreq, sreq, reply, platform, ss);
|
||||
}
|
||||
|
||||
#if 0
|
||||
// huh???
|
||||
|
|
|
@ -45,6 +45,20 @@ int CLIENT_APP_VERSION::parse(FILE* f) {
|
|||
return ERR_XML_PARSE;
|
||||
}
|
||||
|
||||
int FILE_INFO::parse(FILE* f) {
|
||||
char buf[256];
|
||||
|
||||
memset(this, 0, sizeof(FILE_INFO));
|
||||
while (fgets(buf, 256, f)) {
|
||||
if (match_tag(buf, "</file_info>")) {
|
||||
if (!strlen(name)) return ERR_XML_PARSE;
|
||||
return 0;
|
||||
}
|
||||
if (parse_str(buf, "<name>", name, 256)) continue;
|
||||
}
|
||||
return ERR_XML_PARSE;
|
||||
}
|
||||
|
||||
SCHEDULER_REQUEST::SCHEDULER_REQUEST() {
|
||||
}
|
||||
|
||||
|
@ -149,6 +163,13 @@ int SCHEDULER_REQUEST::parse(FILE* fin) {
|
|||
if (!retval) {
|
||||
msgs_from_host.push_back(md);
|
||||
}
|
||||
}
|
||||
else if (match_tag(buf, "<file_info>")) {
|
||||
FILE_INFO fi;
|
||||
retval = fi.parse(fin);
|
||||
if (!retval) {
|
||||
file_infos.push_back(fi);
|
||||
}
|
||||
} else {
|
||||
log_messages.printf(SCHED_MSG_LOG::NORMAL, "SCHEDULER_REQUEST::parse(): unrecognized: %s\n", buf);
|
||||
}
|
||||
|
@ -342,6 +363,13 @@ int SCHEDULER_REPLY::write(FILE* fout) {
|
|||
if (config.non_cpu_intensive) {
|
||||
fprintf(fout, "<non_cpu_intensive/>\n");
|
||||
}
|
||||
|
||||
for (i=0; i<file_deletes.size(); i++) {
|
||||
fprintf(fout,
|
||||
"<delete_file_info>%s</delete_file_info>\n",
|
||||
file_deletes[i].name
|
||||
);
|
||||
}
|
||||
end:
|
||||
fprintf(fout,
|
||||
"</scheduler_reply>\n"
|
||||
|
|
|
@ -55,6 +55,8 @@ struct WORK_REQ {
|
|||
//
|
||||
struct FILE_INFO {
|
||||
char name[256];
|
||||
|
||||
int parse(FILE*);
|
||||
};
|
||||
|
||||
struct MSG_FROM_HOST_DESC {
|
||||
|
|
Loading…
Reference in New Issue