diff --git a/checkin_notes b/checkin_notes index 9be69c815e..9ed07647a2 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6443,3 +6443,38 @@ David 20 June 2007 sched/ feeder.C + +David 20 June 2007 + - added "census", a program that counts up how much RAC + there is for each HR class, and writes it to a file. + This will be used soon for HR support in the feeder. + - split the HR code into hr.C,h (stuff used by both census and scheduler) + and sched_hr.C (stuff used only by the scheduler) + - database: change DB_CREDITED_JOB to treat workunitid + as a double (which it is) rather than a long. + BTW, long == int. + - fixed lots of compile warnings in the server code + + db/ + boinc_db.C,h + lib/ + boinc_cmd.C + miofile.C + util.C + sched/ + Makefile.am + census.C (new) + feeder.C + file_deleter.C + file_upload_handler.C + handle_request.C + hr.C,h (new) + main.C + sample_assimilator.C + sample_work_generator.C + sched_array.C + sched_hr.C,h + sched_send.C + server_types.C + transitioner.C + validator.C diff --git a/db/boinc_db.C b/db/boinc_db.C index bde3bc1a49..3e35585035 100644 --- a/db/boinc_db.C +++ b/db/boinc_db.C @@ -691,7 +691,7 @@ void DB_WORKUNIT::db_parse(MYSQL_ROW &r) { void DB_CREDITED_JOB::db_print(char* buf){ sprintf(buf, - "userid=%d, workunitid=%d", + "userid=%d, workunitid=%f", userid, workunitid ); } @@ -700,7 +700,7 @@ void DB_CREDITED_JOB::db_parse(MYSQL_ROW &r) { int i=0; clear(); userid = atoi(r[i++]); - workunitid = atoi(r[i++]); + workunitid = atof(r[i++]); }; void DB_RESULT::db_print(char* buf){ diff --git a/db/boinc_db.h b/db/boinc_db.h index 1761bba935..019982ac37 100755 --- a/db/boinc_db.h +++ b/db/boinc_db.h @@ -376,7 +376,7 @@ struct WORKUNIT { struct CREDITED_JOB { int userid; - long workunitid; + double workunitid; // the following not used in the DB void clear(); diff --git a/lib/boinc_cmd.C b/lib/boinc_cmd.C index 0a21e5db52..aaaaefefd8 100644 --- a/lib/boinc_cmd.C +++ b/lib/boinc_cmd.C @@ -404,11 +404,11 @@ int main(int argc, char** argv) { if (amrr.error_num != ERR_IN_PROGRESS) break; boinc_sleep(1); } else { - unsigned int i, n = amrr.messages.size(); + unsigned int j, n = amrr.messages.size(); if (n) { printf("Messages from account manager:\n"); - for (i=0; iprojects; while (i < argc) { - PROJECT p; - p.master_url = string(next_arg(argc, argv, i)); - p.short_term_debt = atoi(next_arg(argc, argv, i)); - p.long_term_debt = atoi(next_arg(argc, argv, i)); - projects.push_back(p); + PROJECT proj; + proj.master_url = string(next_arg(argc, argv, i)); + proj.short_term_debt = atoi(next_arg(argc, argv, i)); + proj.long_term_debt = atoi(next_arg(argc, argv, i)); + projects.push_back(proj); } retval = rpc.set_debts(projects); } else if (!strcmp(cmd, "--quit")) { diff --git a/lib/miofile.C b/lib/miofile.C index 23896f0969..92b4f39629 100644 --- a/lib/miofile.C +++ b/lib/miofile.C @@ -78,16 +78,16 @@ int MIOFILE::printf(const char* format, ...) { return retval; } -char* MIOFILE::fgets(char* dst, int len) { +char* MIOFILE::fgets(char* dst, int dst_len) { if (f) { - return ::fgets(dst, len, f); + return ::fgets(dst, dst_len, f); } const char* q = strchr(buf, '\n'); if (!q) return 0; q++; int n = (int)(q - buf); - if (n > len-1) n = len-1; + if (n > dst_len-1) n = dst_len-1; memcpy(dst, buf, n); dst[n] = 0; diff --git a/lib/util.C b/lib/util.C index a6c3607043..e19ab028b8 100755 --- a/lib/util.C +++ b/lib/util.C @@ -454,7 +454,7 @@ int run_program( } #else int run_program( - const char* dir, const char* file, int argc, char** argv, double nsecs, int& id + const char* dir, const char* file, int , char** argv, double nsecs, int& id ) { int retval; int pid = fork(); diff --git a/sched/Makefile.am b/sched/Makefile.am index 4e01677a14..b0452e5103 100644 --- a/sched/Makefile.am +++ b/sched/Makefile.am @@ -2,27 +2,28 @@ include $(top_srcdir)/Makefile.incl -noinst_PROGRAMS = \ - cgi \ - db_dump \ - db_purge \ - delete_file \ - feeder \ - file_deleter \ - file_upload_handler \ - get_file \ - make_work \ - message_handler \ - request_file_list \ +noinst_PROGRAMS = \ + census \ + cgi \ + db_dump \ + db_purge \ + delete_file \ + feeder \ + file_deleter \ + file_upload_handler \ + get_file \ + make_work \ + message_handler \ + request_file_list \ sample_assimilator \ - sample_dummy_assimilator \ - sample_bitwise_validator \ - sample_trivial_validator \ + sample_dummy_assimilator \ + sample_bitwise_validator \ + sample_trivial_validator \ sample_work_generator \ - send_file \ - show_shmem \ - transitioner \ - update_stats \ + send_file \ + show_shmem \ + transitioner \ + update_stats \ wu_check lib_LIBRARIES = libsched.a @@ -37,33 +38,34 @@ LDADD = -L. -lsched $(MYSQL_LIBS) $(BOINC_LIB) $(PTHREAD_LIBS) LIB_SCHED = libsched.a -libsched_a_SOURCES = \ - sched_shmem.C \ - sched_util.C \ - sched_config.C \ - sched_msgs.C \ - ../db/boinc_db.C \ - ../db/db_base.C \ - ../lib/msg_log.C \ - ../tools/process_result_template.C \ +libsched_a_SOURCES = \ + sched_shmem.C \ + sched_util.C \ + sched_config.C \ + sched_msgs.C \ + ../db/boinc_db.C \ + ../db/db_base.C \ + ../lib/msg_log.C \ + ../tools/process_result_template.C \ ../tools/backend_lib.C -EXTRA_DIST = \ - assimilate_handler.h \ - fcgiapp.h \ - fcgi_stdio.h \ - handle_request.h \ - main.h \ - sched_locality.h \ - sched_send.h \ - sched_shmem.h \ - server_types.h \ +EXTRA_DIST = \ + assimilate_handler.h \ + fcgiapp.h \ + fcgi_stdio.h \ + handle_request.h \ + main.h \ + sched_locality.h \ + sched_send.h \ + sched_shmem.h \ + server_types.h \ start cgi_SOURCES = \ edf_sim.C \ handle_request.C \ + hr.C \ main.C \ sched_array.C \ sched_hr.C \ @@ -74,16 +76,19 @@ cgi_SOURCES = \ server_types.C \ ../lib/synch.C +census_SOURCES = \ + census.C \ + hr.C ## install header-files with prefix-subdir BOINC/ to avoid name-conflicts includedir = ${prefix}/include/BOINC/ ## install only headers that are meant for exporting the API !! -include_HEADERS = \ - sched_config.h \ - sched_msgs.h \ - sched_util.h \ - ../tools/backend_lib.h \ +include_HEADERS = \ + sched_config.h \ + sched_msgs.h \ + sched_util.h \ + ../tools/backend_lib.h \ validate_util.h @@ -160,46 +165,46 @@ delete_file_SOURCES = delete_file.C delete_file_DEPENDENCIES = $(LIBRSA) $(LIB_SCHED) delete_file_LDADD = $(LDADD) $(RSA_LIBS) -fcgi_SOURCES = \ - handle_request.C \ - main.C \ - sched_send.C \ - sched_resend.C \ - sched_array.C \ - sched_hr.C \ - server_types.C \ - sched_shmem.C \ - sched_util.C \ - sched_config.C \ - sched_msgs.C \ - sched_locality.C \ - sched_timezone.C \ +fcgi_SOURCES = \ + handle_request.C \ + main.C \ + sched_send.C \ + sched_resend.C \ + sched_array.C \ + sched_hr.C \ + server_types.C \ + sched_shmem.C \ + sched_util.C \ + sched_config.C \ + sched_msgs.C \ + sched_locality.C \ + sched_timezone.C \ edf_sim.C \ - ../db/boinc_db.C \ - ../db/db_base.C \ - ../lib/base64.C \ - ../lib/crypt.C \ - ../lib/filesys.C \ - ../lib/md5.c \ - ../lib/md5_file.C \ - ../lib/miofile.C \ - ../lib/msg_log.C \ - ../lib/parse.C \ - ../lib/shmem.C \ - ../lib/synch.C \ - ../lib/util.C \ - ../tools/process_result_template.C \ + ../db/boinc_db.C \ + ../db/db_base.C \ + ../lib/base64.C \ + ../lib/crypt.C \ + ../lib/filesys.C \ + ../lib/md5.c \ + ../lib/md5_file.C \ + ../lib/miofile.C \ + ../lib/msg_log.C \ + ../lib/parse.C \ + ../lib/shmem.C \ + ../lib/synch.C \ + ../lib/util.C \ + ../tools/process_result_template.C \ ../tools/backend_lib.C fcgi_DEPENDENCIES = $(LIBRSA) $(LIB_SCHED) fcgi_CPPFLAGS = -include fcgi_stdio.h -D_USING_FCGI_ $(AM_CPPFLAGS) fcgi_LDADD = $(LDADD) $(RSA_LIBS) -lfcgi $(MYSQL_LIBS) -fcgi_file_upload_handler_SOURCES = \ - file_upload_handler.C \ - sched_config.C \ - ../lib/miofile.C \ - ../lib/parse.C \ +fcgi_file_upload_handler_SOURCES = \ + file_upload_handler.C \ + sched_config.C \ + ../lib/miofile.C \ + ../lib/parse.C \ ../lib/crypt.C fcgi_file_upload_handler_DEPENDENCIES = $(LIBRSA) $(LIB_SCHED) fcgi_file_upload_handler_CPPFLAGS = -include fcgi_stdio.h -D_USING_FCGI_ $(AM_CPPFLAGS) diff --git a/sched/census.C b/sched/census.C new file mode 100644 index 0000000000..5a07674a7b --- /dev/null +++ b/sched/census.C @@ -0,0 +1,57 @@ +// Berkeley Open Infrastructure for Network Computing +// http://boinc.berkeley.edu +// Copyright (C) 2007 University of California +// +// This is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; +// either version 2.1 of the License, or (at your option) any later version. +// +// This software is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Lesser General Public License for more details. +// +// To view the GNU Lesser General Public License visit +// http://www.gnu.org/copyleft/lesser.html +// or write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +// Census - create a file saying (for each HR type) +// how much RAC each HR class is getting. +// This info is used the feeder to decide how many shared-memory slots +// to devote to each HR class. + +#include + +#include "boinc_db.h" +#include "str_util.h" +#include "sched_config.h" +#include "sched_util.h" +#include "sched_msgs.h" +#include "hr.h" + +int main() { + HR_INFO hri; + int retval; + SCHED_CONFIG config; + + check_stop_daemons(); + retval = config.parse_file(".."); + if (retval) { + log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL, + "Can't parse ../config.xml: %s\n", boincerror(retval) + ); + exit(1); + } + retval = boinc_db.open( + config.db_name, config.db_host, config.db_user, config.db_passwd + ); + if (retval) { + log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL, "Can't open DB\n"); + exit(1); + } + boinc_db.set_isolation_level(READ_UNCOMMITTED); + hri.scan_db(); + hri.write_file("foobar"); +} diff --git a/sched/feeder.C b/sched/feeder.C index 2de2cae90e..1dd695baff 100644 --- a/sched/feeder.C +++ b/sched/feeder.C @@ -280,7 +280,6 @@ static bool scan_work_array(vector &work_items) { bool found; int enum_phase[napps]; int app_index; - int enum_size; int nadditions=0, ncollisions=0; for (i=0; i &work_items) { log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG, "%d results already in array\n", ncollisions ); + return false; } + if (nadditions == 0) { + return false; + } + return true; } void feeder_loop() { diff --git a/sched/file_deleter.C b/sched/file_deleter.C index e61dedbdbe..2798c875f3 100644 --- a/sched/file_deleter.C +++ b/sched/file_deleter.C @@ -541,7 +541,7 @@ void do_antique_pass() { int main(int argc, char** argv) { int retval; - bool one_pass = false, retry_error = false, delete_antiques = false; + bool one_pass = false; int i; check_stop_daemons(); diff --git a/sched/file_upload_handler.C b/sched/file_upload_handler.C index 039cfadda6..0d1d0e1eb5 100644 --- a/sched/file_upload_handler.C +++ b/sched/file_upload_handler.C @@ -218,7 +218,7 @@ int copy_socket_to_file(FILE* in, char* path, double offset, double nbytes) { ssize_t ret = write(fd, buf+n-to_write, to_write); if (ret < 0) { close(fd); - char* errmsg; + const char* errmsg; if (errno == ENOSPC) { errmsg = "No space left on server"; } else { @@ -590,7 +590,9 @@ int main() { int retval; R_RSA_PUBLIC_KEY key; char log_path[256]; +#ifdef _USING_FCGI_ unsigned int counter=0; +#endif elapsed_wallclock_time(); installer(); diff --git a/sched/handle_request.C b/sched/handle_request.C index 4a53f23431..9af97a0a34 100644 --- a/sched/handle_request.C +++ b/sched/handle_request.C @@ -490,7 +490,7 @@ static int update_host_record(HOST& initial_host, HOST& xhost, USER& user) { // should be aborted outright, or aborted if not started yet // int send_result_abort( - SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply, SCHED_SHMEM& ss + SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply, SCHED_SHMEM& ) { int aborts_sent = 0; int retval = 0; diff --git a/sched/hr.C b/sched/hr.C new file mode 100644 index 0000000000..8e5d257db2 --- /dev/null +++ b/sched/hr.C @@ -0,0 +1,225 @@ +// Berkeley Open Infrastructure for Network Computing +// http://boinc.berkeley.edu +// Copyright (C) 2007 University of California +// +// This is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; +// either version 2.1 of the License, or (at your option) any later version. +// +// This software is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Lesser General Public License for more details. +// +// To view the GNU Lesser General Public License visit +// http://www.gnu.org/copyleft/lesser.html +// or write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +#include "error_numbers.h" +#include "str_util.h" + +#include "hr.h" + +const int nocpu = 1; +const int Intel = 2; +const int AMD = 3; +const int Macintosh = 4; +const int AMDAthlon = 5; +const int AMDDuron = 6; +const int AMDSempron = 7; +const int AMDOpteron = 8; +const int AMDAthlon64 = 9; +const int AMDAthlonXP = 10; +const int IntelXeon = 11; +const int IntelCeleron = 12; +const int IntelPentium = 13; +const int IntelPentiumII = 14; +const int IntelPentiumIII = 15; +const int IntelPentium4 = 16; +const int IntelPentiumD = 17; +const int IntelPentiumM = 18; +const int AMDAthlonMP = 19; +const int AMDTurion = 20; +const int IntelCore2 = 21; + +const int noos = 128; +const int Linux = 256; +const int Windows = 384; +const int Darwin = 512; +const int freebsd = 640; + +inline int os(HOST& host){ + if (strcasestr(host.os_name, "Linux")) return Linux; + else if (strcasestr(host.os_name, "Windows")) return Windows; + else if (strcasestr(host.os_name, "Darwin")) return Darwin; + else if (strcasestr(host.os_name, "FreeBSD")) return freebsd; + else return noos; +}; + +inline int cpu_coarse(HOST& host){ + if (strcasestr(host.p_vendor, "Intel")) return Intel; + if (strcasestr(host.p_vendor, "AMD")) return AMD; + if (strcasestr(host.p_vendor, "Macintosh")) return Macintosh; + return nocpu; +} + +inline int cpu_fine(HOST& host){ + if (strcasestr(host.p_vendor, "Intel")) { + if (strcasestr(host.p_model, "Xeon")) return IntelXeon; + if (strcasestr(host.p_model, "Celeron")) { + if (strcasestr(host.p_model, " M ")) return IntelPentiumM; + if (strcasestr(host.p_model, " D ")) return IntelPentiumD; + if (strcasestr(host.p_model, "III")) return IntelPentiumIII; + return IntelCeleron; + } + if (strcasestr(host.p_model, "Core")) return IntelCore2; + if (strcasestr(host.p_model, "Pentium")) { + if (strcasestr(host.p_model, "III")) return IntelPentiumIII; + if (strcasestr(host.p_model, "II")) return IntelPentiumII; + if (strcasestr(host.p_model, " 4 ")) return IntelPentium4; + if (strcasestr(host.p_model, " D ")) return IntelPentiumD; + if (strcasestr(host.p_model, " M ")) return IntelPentiumM; + return IntelPentium; + } + if (strcasestr(host.p_model, "x86")) { + if (strcasestr(host.p_model, "Family 6 Model 6")) return IntelCeleron; + if (strcasestr(host.p_model, "Family 6 Model 9")) return IntelPentiumM; + if (strcasestr(host.p_model, "Family 6 Model 10")) return IntelXeon; + if (strcasestr(host.p_model, "Family 5 Model 1")) return IntelPentium; + if (strcasestr(host.p_model, "Family 5 Model 2")) return IntelPentium; + if (strcasestr(host.p_model, "Family 6 Model 1")) return IntelPentium; + if (strcasestr(host.p_model, "Family 15 Model 1")) return IntelPentium4; + if (strcasestr(host.p_model, "Family 15 Model 2")) return IntelPentium4; + if (strcasestr(host.p_model, "Family 6 Model 7")) return IntelPentiumIII; + if (strcasestr(host.p_model, "Family 6 Model 8" )) return IntelPentiumIII; + if (strcasestr(host.p_model, "Family 6 Model 11")) return IntelPentiumIII; + if (strcasestr(host.p_model, "Family 6 Model 3")) return IntelPentiumII; + if (strcasestr(host.p_model, "Family 6 Model 5")) return IntelPentiumII; + } + return Intel; + } + if (strcasestr(host.p_vendor, "AMD")) { + if (strcasestr(host.p_model, "Duron")) return AMDDuron; + if (strcasestr(host.p_model, "Opteron")) return AMDOpteron; + if (strcasestr(host.p_model, "Sempron")) return AMDSempron; + if (strcasestr(host.p_model, "Turion")) return AMDTurion; + if (strcasestr(host.p_model, "Athlon")) { + if (strcasestr(host.p_model, "XP")) return AMDAthlonXP; + if (strcasestr(host.p_model, "MP")) return AMDAthlonMP; + if (strcasestr(host.p_model, "64")) return AMDAthlon64; + return AMDAthlon; + } + return AMD; + } + if (strcasestr(host.p_vendor, "Macintosh")) return Macintosh; + return nocpu; +}; + +// call this ONLY if hr_unknown_platform_type() returns false + +int hr_class(HOST& host, int hr_type) { + switch (hr_type) { + case 1: + return os(host) + cpu_fine(host); + case 2: + switch (os(host)) { + case Windows: + case Linux: + return os(host); + case Darwin: + return os(host) + cpu_coarse(host); + } + } + return 0; +} + +bool hr_unknown_platform_type(HOST& host, int hr_type) { + switch (hr_type) { + case 1: + if (os(host) == noos) return true; + if (cpu_fine(host) == nocpu) return true; + return false; + case 2: + switch (os(host)) { + case Windows: + case Linux: + return false; + case Darwin: + switch(cpu_coarse(host)) { + case Intel: + case Macintosh: + return false; + } + return true; + } + return true; + } + return false; +} + +void HR_INFO::write_file(const char* filename) { + int i, j; + + FILE* f = fopen(filename, "w"); + for (i=1; i1"); + if (retval) break; + printf("host %d: %s | %s | %s\n", host.id, host.os_name, host.p_vendor, host.p_model); + for (i=1; i output_file_paths; char copy_path[256]; get_output_file_paths(canonical_result, output_file_paths); - int n = output_file_paths.size(); + unsigned int n = output_file_paths.size(); for (i=0; inapps; i++) { APP& app = ssp->apps[i]; - if (!hr_unknown_platform_app(host, app)) return false; + if (!hr_unknown_platform_type(host, app_hr_type(app))) return false; } return true; } @@ -188,7 +55,7 @@ bool hr_unknown_platform(HOST& host) { bool already_sent_to_different_platform_quick( SCHEDULER_REQUEST& sreq, WORKUNIT& wu, APP& app ) { - if (wu.hr_class && (hr_class(sreq.host, app) != wu.hr_class)) { + if (wu.hr_class && (hr_class(sreq.host, app_hr_type(app)) != wu.hr_class)) { return true; } return false; @@ -223,7 +90,7 @@ bool already_sent_to_different_platform_careful( return true; } wreq.hr_reject_temp = false; - int host_hr_class = hr_class(sreq.host, app); + int host_hr_class = hr_class(sreq.host, app_hr_type(app)); if (wu_hr_class) { if (host_hr_class != wu_hr_class) { wreq.hr_reject_temp = true; diff --git a/sched/sched_hr.h b/sched/sched_hr.h index 3d47646852..c0382772cf 100644 --- a/sched/sched_hr.h +++ b/sched/sched_hr.h @@ -27,12 +27,10 @@ extern bool already_sent_to_different_platform_careful( extern bool hr_unknown_platform(HOST&); -extern int hr_class(HOST&, APP&); - // return the HR type to use for this app; // app-specific HR type overrides global HR type // -inline int hr_type(APP& app) { +inline int app_hr_type(APP& app) { if (app.homogeneous_redundancy) { return app.homogeneous_redundancy; } diff --git a/sched/sched_send.C b/sched/sched_send.C index 931c0dbebc..074c21c907 100644 --- a/sched/sched_send.C +++ b/sched/sched_send.C @@ -44,6 +44,7 @@ using namespace std; #include "sched_array.h" #include "sched_msgs.h" #include "sched_hr.h" +#include "hr.h" #include "sched_locality.h" #include "sched_timezone.h" @@ -306,7 +307,7 @@ static int get_host_info(SCHEDULER_REPLY& reply) { // If they have, then only send work for the allowed applications // static inline int check_app_filter( - WORKUNIT& wu, SCHEDULER_REQUEST& request, SCHEDULER_REPLY& reply + WORKUNIT& wu, SCHEDULER_REQUEST& , SCHEDULER_REPLY& reply ) { unsigned int i; @@ -379,7 +380,7 @@ static inline int check_memory( } static inline int check_disk( - WORKUNIT& wu, SCHEDULER_REQUEST& request, SCHEDULER_REPLY& reply + WORKUNIT& wu, SCHEDULER_REQUEST& , SCHEDULER_REPLY& reply ) { if (wu.rsc_disk_bound > reply.wreq.disk_available) { reply.wreq.insufficient_disk = true; @@ -435,7 +436,7 @@ int wu_is_infeasible( log_messages.printf( SCHED_MSG_LOG::MSG_DEBUG, "[HOST#%d] [WU#%d %s] failed quick HR check: WU is class %d, host is class %d\n", - reply.host.id, wu.id, wu.name, wu.hr_class, hr_class(request.host, *app) + reply.host.id, wu.id, wu.name, wu.hr_class, hr_class(request.host, app_hr_type(*app)) ); return INFEASIBLE_HR; } @@ -577,7 +578,7 @@ bool app_core_compatible(WORK_REQ& wreq, APP_VERSION& av) { // Add the app and app_version to the reply also. // int add_wu_to_reply( - WORKUNIT& wu, SCHEDULER_REPLY& reply, PLATFORM_LIST& platforms, + WORKUNIT& wu, SCHEDULER_REPLY& reply, PLATFORM_LIST& , APP* app, APP_VERSION* avp ) { int retval; diff --git a/sched/server_types.C b/sched/server_types.C index fc7086beed..a4be2770c2 100644 --- a/sched/server_types.C +++ b/sched/server_types.C @@ -444,7 +444,7 @@ SCHEDULER_REPLY::~SCHEDULER_REPLY() { } int SCHEDULER_REPLY::write(FILE* fout) { - unsigned int i, j; + unsigned int i; char buf[LARGE_BLOB_SIZE]; // Note: at one point we had diff --git a/sched/transitioner.C b/sched/transitioner.C index 0c9f28f1c4..633b557a38 100644 --- a/sched/transitioner.C +++ b/sched/transitioner.C @@ -493,7 +493,12 @@ int handle_wu( } } } else if ( wu_item.assimilate_state == ASSIMILATE_DONE ) { - log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG, "[WU#%d %s] not checking for items to be ready for delete because the deferred delete time has not expired. That will occur in %d seconds\n", wu_item.id, wu_item.name, most_recently_returned + config.delete_delay_hours*60*60-now); + log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG, + "[WU#%d %s] not checking for items to be ready for delete because the deferred delete time has not expired. That will occur in %d seconds\n", + wu_item.id, + wu_item.name, + most_recently_returned + config.delete_delay_hours*60*60-(int)now + ); } // compute next transition time = minimum timeout of in-progress results diff --git a/sched/validator.C b/sched/validator.C index 4f87d5663a..c35ea947d4 100644 --- a/sched/validator.C +++ b/sched/validator.C @@ -215,14 +215,14 @@ int is_valid(RESULT& result, WORKUNIT& wu) { if (retval) { log_messages.printf( SCHED_MSG_LOG::MSG_CRITICAL, - "[RESULT#%d] Warning: credited_job insert failed (userid: %d workunit: %d err: %d)\n", - result.id, user.id, long(wu.opaque), retval + "[RESULT#%d] Warning: credited_job insert failed (userid: %d workunit: %f err: %d)\n", + result.id, user.id, wu.opaque, retval ); } else { log_messages.printf( SCHED_MSG_LOG::MSG_DEBUG, - "[RESULT#%d %s] added credited_job record [WU#%d OPAQUE#%d USER#%d]\n", - result.id, result.name, wu.id, long(wu.opaque), user.id + "[RESULT#%d %s] added credited_job record [WU#%d OPAQUE#%f USER#%d]\n", + result.id, result.name, wu.id, wu.opaque, user.id ); } }