mirror of https://github.com/BOINC/boinc.git
- client: add <use_all_gpus> config option. If set, use GPUs
even if they're not equivalent to the most capable one. - Validator: fix one_pass_N_WU option. svn path=/trunk/boinc/; revision=17896
This commit is contained in:
parent
7f9f31f652
commit
e3a730c334
|
@ -4199,3 +4199,16 @@ David 27 Apr 2009
|
|||
|
||||
client/
|
||||
gui_rpc_server_ops.cpp
|
||||
|
||||
David 27 Apr 2009
|
||||
- client: add <use_all_gpus> config option. If set, use GPUs
|
||||
even if they're not equivalent to the most capable one.
|
||||
- Validator: fix one_pass_N_WU option.
|
||||
|
||||
client/
|
||||
client_state.cpp
|
||||
log_flags.cpp,h
|
||||
lib/
|
||||
coproc.cpp,h
|
||||
sched/
|
||||
validator.cpp
|
||||
|
|
|
@ -254,7 +254,7 @@ int CLIENT_STATE::init() {
|
|||
set_ncpus();
|
||||
show_host_info();
|
||||
if (!config.no_gpus) {
|
||||
vector<string> strs = coprocs.get();
|
||||
vector<string> strs = coprocs.get(config.use_all_gpus);
|
||||
for (i=0; i<strs.size(); i++) {
|
||||
msg_printf(NULL, MSG_INFO, strs[i].c_str());
|
||||
}
|
||||
|
|
|
@ -161,6 +161,9 @@ void CONFIG::show() {
|
|||
if (config.no_priority_change) {
|
||||
msg_printf(NULL, MSG_INFO, "Configured to run apps at regular priority");
|
||||
}
|
||||
if (config.use_all_gpus) {
|
||||
msg_printf(NULL, MSG_INFO, "Configured to use all coprocessors");
|
||||
}
|
||||
}
|
||||
|
||||
CONFIG::CONFIG() {
|
||||
|
@ -193,6 +196,7 @@ CONFIG::CONFIG() {
|
|||
no_gpus = false;
|
||||
zero_debts = false;
|
||||
no_priority_change = false;
|
||||
use_all_gpus = false;
|
||||
}
|
||||
|
||||
int CONFIG::parse_options(XML_PARSER& xp) {
|
||||
|
@ -264,6 +268,7 @@ int CONFIG::parse_options(XML_PARSER& xp) {
|
|||
if (xp.parse_bool(tag, "no_gpus", no_gpus)) continue;
|
||||
if (xp.parse_bool(tag, "zero_debts", zero_debts)) continue;
|
||||
if (xp.parse_bool(tag, "no_priority_change", no_priority_change)) continue;
|
||||
if (xp.parse_bool(tag, "use_all_gpus", use_all_gpus)) continue;
|
||||
if (xp.parse_bool(tag, "abort_jobs_on_exit", btemp)) {
|
||||
gstate.abort_jobs_on_exit = true;
|
||||
continue;
|
||||
|
|
|
@ -133,6 +133,7 @@ struct CONFIG {
|
|||
bool no_gpus;
|
||||
bool zero_debts;
|
||||
bool no_priority_change;
|
||||
bool use_all_gpus;
|
||||
|
||||
CONFIG();
|
||||
int parse(FILE*);
|
||||
|
|
|
@ -102,10 +102,9 @@ void COPROCS::summary_string(char* buf, int len) {
|
|||
strcpy(buf, bigbuf);
|
||||
}
|
||||
|
||||
vector<string> COPROCS::get() {
|
||||
vector<string> COPROCS::get(bool use_all) {
|
||||
vector<string> strings;
|
||||
COPROC_CUDA::get(*this, strings);
|
||||
COPROC_CELL_SPE::get(*this, strings);
|
||||
COPROC_CUDA::get(*this, strings, use_all);
|
||||
return strings;
|
||||
}
|
||||
|
||||
|
@ -161,7 +160,10 @@ int cuda_compare(COPROC_CUDA& c1, COPROC_CUDA& c2, bool ignore_flops) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void COPROC_CUDA::get(COPROCS& coprocs, vector<string>& strings) {
|
||||
void COPROC_CUDA::get(
|
||||
COPROCS& coprocs, vector<string>& strings,
|
||||
bool use_all // if false, use only those equivalent to most capable
|
||||
) {
|
||||
int count;
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -282,7 +284,7 @@ void COPROC_CUDA::get(COPROCS& coprocs, vector<string>& strings) {
|
|||
for (i=0; i<gpus.size(); i++) {
|
||||
char buf[256];
|
||||
cc.description(buf);
|
||||
if (!cuda_compare(gpus[i], best, true)) {
|
||||
if (use_all || !cuda_compare(gpus[i], best, true)) {
|
||||
best.device_nums[best.count] = gpus[i].device_num;
|
||||
best.count++;
|
||||
strings.push_back("CUDA device: "+string(buf));
|
||||
|
@ -469,7 +471,3 @@ int COPROC_CUDA::parse(FILE* fin) {
|
|||
}
|
||||
return ERR_XML_PARSE;
|
||||
}
|
||||
|
||||
void COPROC_CELL_SPE::get(COPROCS&, vector<string>&) {
|
||||
return;
|
||||
}
|
||||
|
|
11
lib/coproc.h
11
lib/coproc.h
|
@ -140,7 +140,7 @@ struct COPROCS {
|
|||
}
|
||||
}
|
||||
#endif
|
||||
std::vector<std::string> get();
|
||||
std::vector<std::string> get(bool use_all);
|
||||
int parse(FILE*);
|
||||
void summary_string(char*, int);
|
||||
COPROC* lookup(const char*);
|
||||
|
@ -204,7 +204,7 @@ struct COPROC_CUDA : public COPROC {
|
|||
#endif
|
||||
COPROC_CUDA(): COPROC("CUDA"){}
|
||||
virtual ~COPROC_CUDA(){}
|
||||
static void get(COPROCS&, std::vector<std::string>&);
|
||||
static void get(COPROCS&, std::vector<std::string>&, bool use_all);
|
||||
void description(char*);
|
||||
void clear();
|
||||
int parse(FILE*);
|
||||
|
@ -220,13 +220,6 @@ struct COPROC_CUDA : public COPROC {
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
struct COPROC_CELL_SPE : public COPROC {
|
||||
static void get(COPROCS&, std::vector<std::string>&);
|
||||
COPROC_CELL_SPE() : COPROC("Cell SPE"){}
|
||||
virtual ~COPROC_CELL_SPE(){}
|
||||
};
|
||||
|
||||
void fake_cuda(COPROCS&, int);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -608,15 +608,13 @@ bool do_validate_scan() {
|
|||
DB_VALIDATOR_ITEM_SET validator;
|
||||
std::vector<VALIDATOR_ITEM> items;
|
||||
bool found=false;
|
||||
int retval;
|
||||
int retval, i=0;
|
||||
|
||||
// loop over entries that need to be checked
|
||||
//
|
||||
while (1) {
|
||||
retval = validator.enumerate(
|
||||
app.id, one_pass_N_WU?one_pass_N_WU:SELECT_LIMIT,
|
||||
wu_id_modulus, wu_id_remainder,
|
||||
items
|
||||
app.id, SELECT_LIMIT, wu_id_modulus, wu_id_remainder, items
|
||||
);
|
||||
if (retval) {
|
||||
if (retval != ERR_DB_NOT_FOUND) {
|
||||
|
@ -629,6 +627,7 @@ bool do_validate_scan() {
|
|||
}
|
||||
retval = handle_wu(validator, items);
|
||||
if (!retval) found = true;
|
||||
if (++i == one_pass_N_WU) break;
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue