- scheduler: add <need_ati_libs> option

svn path=/trunk/boinc/; revision=25747
This commit is contained in:
David Anderson 2012-06-07 03:39:37 +00:00
parent 68df21fc6b
commit 0492e0c2b8
5 changed files with 40 additions and 8 deletions

View File

@ -4227,3 +4227,11 @@ Bernd 6 Jun 2012
sched/
plan_class_spec.cpp
David 6 June 2012
- scheduler: add <need_ati_libs> option
sched/
plan_class_spec.cpp,h
handle_request.cpp
sched_config.h

View File

@ -72,11 +72,15 @@ static bool find_host_by_other(DB_USER& user, HOST req_host, DB_HOST& host) {
// don't dig through hosts of these users
// prevents flooding the DB with slow queries from users with many hosts
for(unsigned int i=0; i < config.dont_search_host_for_userid.size(); i++)
if (user.id == config.dont_search_host_for_userid[i])
return false;
//
for (unsigned int i=0; i < config.dont_search_host_for_userid.size(); i++) {
if (user.id == config.dont_search_host_for_userid[i]) {
return false;
}
}
// Only check if the fields are populated
// Only check if all the fields are populated
//
if (strlen(req_host.domain_name) && strlen(req_host.last_ip_addr) && strlen(req_host.os_name) && strlen(req_host.p_model)) {
strcpy(dn, req_host.domain_name);
escape_string(dn, 512);

View File

@ -246,6 +246,17 @@ bool PLAN_CLASS_SPEC::check(SCHEDULER_REQUEST& sreq, HOST_USAGE& hu) {
if (min_driver_version) {
ati_requirements.update(abs(min_driver_version), 0);
}
if (need_ati_libs) {
if (!cp.atirt_detected) {
return false;
}
} else {
if (!cp.amdrt_detected) {
return false;
}
}
cp.set_peak_flops();
gpu_ram = cp.opencl_prop.global_mem_size;
@ -531,6 +542,8 @@ int PLAN_CLASS_SPEC::parse(XML_PARSER& xp) {
if (xp.parse_int("max_driver_version", max_driver_version)) continue;
if (xp.parse_str("gpu_utilization_tag", gpu_utilization_tag, sizeof(gpu_utilization_tag))) continue;
if (xp.parse_bool("need_ati_libs", need_ati_libs)) continue;
if (xp.parse_int("min_nvidia_compcap", min_nvidia_compcap)) continue;
if (xp.parse_int("max_nvidia_compcap", max_nvidia_compcap)) continue;
@ -594,6 +607,8 @@ PLAN_CLASS_SPEC::PLAN_CLASS_SPEC() {
max_driver_version = 0;
strcpy(gpu_utilization_tag, "");
need_ati_libs = false;
min_nvidia_compcap = 0;
max_nvidia_compcap = 0;
min_cuda_version = 0;

View File

@ -56,6 +56,11 @@ struct PLAN_CLASS_SPEC {
char gpu_utilization_tag[256];
// the project prefs tag for user-supplied gpu_utilization factor
// AMD/ATI apps
//
bool need_ati_libs;
// need DLLs w/ ati name (default: amd)
// NVIDIA apps
//
int min_nvidia_compcap;

View File

@ -105,11 +105,13 @@ struct SCHED_CONFIG {
vector<regex_t> *ban_cpu;
vector<regex_t> *ban_os;
vector<int> dont_search_host_for_userid;
int daily_result_quota; // max results per day is this * mult
char debug_req_reply_dir[256];
// keep sched_request and sched_reply in files in this directory
double default_disk_max_used_gb;
double default_disk_max_used_pct;
double default_disk_min_free_gb;
vector<int> dont_search_host_for_userid;
bool dont_store_success_stderr;
int file_deletion_strategy;
// select method of automatically deleting files from host
@ -153,7 +155,7 @@ struct SCHED_CONFIG {
// use the client's primary platform if a version exists.
// e.g. send 64-bit versions to 64-bit clients,
// rather than trying the 32-bit version to see if it's faster.
// Do this only if you're sure that your 64-bit versions are
// Do this only if you're sure that the 64-bit versions are
// always faster than the corresponding 32-bit versions
double version_select_random_factor;
// in deciding what version is fastest,
@ -192,8 +194,6 @@ struct SCHED_CONFIG {
bool debug_vda;
bool debug_version_select;
char debug_req_reply_dir[256]; // keep sched_request and sched_reply
// in files in this directory
int parse(FILE*);
int parse_aux(FILE*);
int parse_file(const char *dir = 0);