mirror of https://github.com/BOINC/boinc.git
- server: compile fix
- server: add nfiles_on_host(), a support function for "locality scheduling lite". svn path=/trunk/boinc/; revision=26061
This commit is contained in:
parent
32da1a7e37
commit
0483da30f4
|
@ -5748,3 +5748,16 @@ David 24 Aug 2012
|
|||
html/ops/
|
||||
db_update.php
|
||||
manage_apps.php
|
||||
|
||||
David 26 Aug 2012
|
||||
- server: compile fix
|
||||
- server: add nfiles_on_host(),
|
||||
a support function for "locality scheduling lite".
|
||||
|
||||
vda/
|
||||
vda_lib.h
|
||||
sched_vda.cpp
|
||||
client/
|
||||
client_state.cpp
|
||||
sched/
|
||||
sched_send.cpp
|
||||
|
|
|
@ -564,12 +564,13 @@ int CLIENT_STATE::init() {
|
|||
//
|
||||
set_client_state_dirty("init");
|
||||
|
||||
// initialize GUI RPC data structures before we start accepting
|
||||
// GUI RPC's.
|
||||
// check for initialization files
|
||||
//
|
||||
acct_mgr_info.init();
|
||||
project_init.init();
|
||||
|
||||
// set up for handling GUI RPCs
|
||||
//
|
||||
if (!no_gui_rpc) {
|
||||
// When we're running at boot time,
|
||||
// it may be a few seconds before we can socket/bind/listen.
|
||||
|
|
|
@ -37,19 +37,20 @@
|
|||
#include "synch.h"
|
||||
|
||||
#include "credit.h"
|
||||
#include "sched_types.h"
|
||||
#include "sched_shmem.h"
|
||||
#include "sched_config.h"
|
||||
#include "sched_util.h"
|
||||
#include "sched_main.h"
|
||||
#include "sched_array.h"
|
||||
#include "sched_msgs.h"
|
||||
#include "sched_hr.h"
|
||||
#include "hr.h"
|
||||
#include "sched_locality.h"
|
||||
#include "sched_timezone.h"
|
||||
#include "sched_array.h"
|
||||
#include "sched_assign.h"
|
||||
#include "sched_config.h"
|
||||
#include "sched_customize.h"
|
||||
#include "sched_hr.h"
|
||||
#include "sched_locality.h"
|
||||
#include "sched_main.h"
|
||||
#include "sched_msgs.h"
|
||||
#include "sched_shmem.h"
|
||||
#include "sched_score.h"
|
||||
#include "sched_timezone.h"
|
||||
#include "sched_types.h"
|
||||
#include "sched_util.h"
|
||||
#include "sched_version.h"
|
||||
|
||||
#include "sched_send.h"
|
||||
|
@ -62,10 +63,32 @@
|
|||
//
|
||||
const double DEFAULT_RAM_SIZE = 64000000;
|
||||
|
||||
void send_work_matchmaker();
|
||||
|
||||
int preferred_app_message_index=0;
|
||||
|
||||
// return the number of sticky files present on host, used by job
|
||||
//
|
||||
int nfiles_on_host(WORKUNIT& wu) {
|
||||
MIOFILE mf;
|
||||
mf.init_buf_read(wu.xml_doc);
|
||||
XML_PARSER xp(&mf);
|
||||
int n=0;
|
||||
while (!xp.get_tag()) {
|
||||
if (xp.match_tag("file_info")) {
|
||||
FILE_INFO fi;
|
||||
int retval = fi.parse(xp);
|
||||
if (retval) continue;
|
||||
for (unsigned i=0; i<g_request->file_infos.size(); i++) {
|
||||
FILE_INFO& fi2 = g_request->file_infos[i];
|
||||
if (!strstr(fi.name, fi2.name)) {
|
||||
n++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
const char* infeasible_string(int code) {
|
||||
switch (code) {
|
||||
case INFEASIBLE_MEM: return "Not enough memory";
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "filesys.h"
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "boinc_db.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue