mirror of https://github.com/BOINC/boinc.git
- more code shuffle: add COPROCS to HOST_INFO
svn path=/trunk/boinc/; revision=19797
This commit is contained in:
parent
5ff3c7e4c9
commit
6b937c7e54
|
@ -9798,3 +9798,13 @@ David 6 Dec 2009
|
|||
client_state.h
|
||||
lib/
|
||||
coproc.cpp,h
|
||||
|
||||
David 6 Dec 2009
|
||||
- more code shuffle: add COPROCS to HOST_INFO
|
||||
|
||||
client/
|
||||
client_state.cpp,h
|
||||
cs_scheduler.cpp
|
||||
cpu_sched.cpp
|
||||
lib/
|
||||
hostinfo.h
|
||||
|
|
|
@ -244,7 +244,7 @@ int CLIENT_STATE::init() {
|
|||
if (!config.no_gpus) {
|
||||
vector<string> descs;
|
||||
vector<string> warnings;
|
||||
coprocs.get(
|
||||
host_info.coprocs.get(
|
||||
config.use_all_gpus, descs, warnings,
|
||||
config.ignore_cuda_dev, config.ignore_ati_dev
|
||||
);
|
||||
|
@ -256,7 +256,7 @@ int CLIENT_STATE::init() {
|
|||
msg_printf(NULL, MSG_INFO, warnings[i].c_str());
|
||||
}
|
||||
}
|
||||
if (coprocs.coprocs.size() == 0) {
|
||||
if (host_info.coprocs.coprocs.size() == 0) {
|
||||
msg_printf(NULL, MSG_INFO, "No usable GPUs found");
|
||||
}
|
||||
#if 0
|
||||
|
@ -267,8 +267,8 @@ int CLIENT_STATE::init() {
|
|||
fake_ati(coprocs, 2);
|
||||
msg_printf(NULL, MSG_INFO, "Faking an ATI GPU");
|
||||
#endif
|
||||
coproc_cuda = (COPROC_CUDA*)coprocs.lookup("CUDA");
|
||||
coproc_ati = (COPROC_ATI*)coprocs.lookup("ATI");
|
||||
coproc_cuda = (COPROC_CUDA*)host_info.coprocs.lookup("CUDA");
|
||||
coproc_ati = (COPROC_ATI*)host_info.coprocs.lookup("ATI");
|
||||
}
|
||||
|
||||
// check for app_info.xml file in project dirs.
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
#include "coproc.h"
|
||||
|
||||
#include "acct_mgr.h"
|
||||
#include "acct_setup.h"
|
||||
#include "app.h"
|
||||
|
@ -41,7 +43,6 @@ using std::vector;
|
|||
#include "prefs.h"
|
||||
#include "scheduler_op.h"
|
||||
#include "time_stats.h"
|
||||
#include "coproc.h"
|
||||
|
||||
#define WORK_FETCH_DONT_NEED 0
|
||||
// project: suspended, deferred, or no new work (can't ask for more work)
|
||||
|
@ -80,7 +81,6 @@ public:
|
|||
GUI_RPC_CONN_SET gui_rpcs;
|
||||
TIME_STATS time_stats;
|
||||
GUI_HTTP gui_http;
|
||||
COPROCS coprocs;
|
||||
|
||||
VERSION_INFO core_client_version;
|
||||
string statefile_platform_name;
|
||||
|
|
|
@ -655,7 +655,7 @@ void CLIENT_STATE::schedule_cpus() {
|
|||
proc_rsc.ncpus = ncpus;
|
||||
proc_rsc.ncpus_used = 0;
|
||||
proc_rsc.ram_left = available_ram();
|
||||
proc_rsc.coprocs.clone(coprocs, false);
|
||||
proc_rsc.coprocs.clone(host_info.coprocs, false);
|
||||
|
||||
if (log_flags.cpu_sched_debug) {
|
||||
msg_printf(0, MSG_INFO, "[cpu_sched_debug] schedule_cpus(): start");
|
||||
|
@ -1027,7 +1027,7 @@ static inline void assign_coprocs(vector<RESULT*> jobs) {
|
|||
COPROC* cp;
|
||||
double usage;
|
||||
|
||||
gstate.coprocs.clear_usage();
|
||||
gstate.host_info.coprocs.clear_usage();
|
||||
|
||||
// fill in pending usage
|
||||
//
|
||||
|
|
|
@ -241,10 +241,10 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) {
|
|||
coproc_ati->estimated_delay = ati_work_fetch.req_secs?ati_work_fetch.busy_time_estimator.get_busy_time():0;
|
||||
}
|
||||
|
||||
if (coprocs.coprocs.size()) {
|
||||
if (host_info.coprocs.coprocs.size()) {
|
||||
fprintf(f, " <coprocs>\n");
|
||||
for (i=0; i<coprocs.coprocs.size(); i++) {
|
||||
COPROC* c = coprocs.coprocs[i];
|
||||
for (i=0; i<host_info.coprocs.coprocs.size(); i++) {
|
||||
COPROC* c = host_info.coprocs.coprocs[i];
|
||||
c->write_xml(mf);
|
||||
}
|
||||
fprintf(f, " </coprocs>\n");
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
// NET_STATS (average network bandwidths)
|
||||
|
||||
#include "miofile.h"
|
||||
#include "coproc.h"
|
||||
|
||||
class HOST_INFO {
|
||||
public:
|
||||
|
@ -57,6 +58,8 @@ public:
|
|||
char os_name[256];
|
||||
char os_version[256];
|
||||
|
||||
COPROCS coprocs;
|
||||
|
||||
HOST_INFO();
|
||||
int parse(MIOFILE&);
|
||||
int write(MIOFILE&, bool suppress_net_info);
|
||||
|
|
Loading…
Reference in New Issue