Commit e057c552 authored by David Anderson's avatar David Anderson

- client: add <exclusive_gpu_app> option:

    suspend GPU usage when particular apps are running

svn path=/trunk/boinc/; revision=19573
parent 165d3762
......@@ -9170,3 +9170,13 @@ David 12 Nov 2009
log_flags.cpp,h
lib/
coproc.cpp,h
David 13 Nov 2009
- client: add <exclusive_gpu_app> option:
suspend GPU usage when particular apps are running
client/
app.cpp,h
cs_prefs.cpp
cpu_sched.cpp
log_flags.cpp,h
......@@ -75,6 +75,9 @@
using std::max;
using std::min;
bool exclusive_app_running;
bool exclusive_gpu_app_running;
#define ABORT_TIMEOUT 60
// if we send app <abort> request, wait this long before killing it.
// This gives it time to download symbol files (which can be several MB)
......@@ -345,12 +348,19 @@ void ACTIVE_TASK_SET::get_memory_usage() {
}
exclusive_app_running = false;
exclusive_gpu_app_running = false;
for (i=0; i<config.exclusive_apps.size(); i++) {
if (app_running(piv, config.exclusive_apps[i].c_str())) {
exclusive_app_running = true;
break;
}
}
for (i=0; i<config.exclusive_gpu_apps.size(); i++) {
if (app_running(piv, config.exclusive_gpu_apps[i].c_str())) {
exclusive_gpu_app_running = true;
break;
}
}
#if 0
// the following is not useful because most OSs don't
......
......@@ -262,7 +262,6 @@ public:
void free_mem();
bool slot_taken(int);
void get_memory_usage();
bool exclusive_app_running;
// graphics-related functions
void graphics_poll();
......@@ -274,4 +273,6 @@ public:
int parse(MIOFILE&);
};
extern bool exclusive_app_running;
extern bool exclusive_gpu_app_running;
#endif
......@@ -87,6 +87,7 @@ struct PROC_RESOURCES {
//
bool can_schedule(RESULT* rp) {
if (rp->uses_coprocs()) {
if (exclusive_gpu_app_running) return false;
if (gstate.user_active && !gstate.global_prefs.run_gpu_if_user_active) {
#if 1
return false;
......
......@@ -125,7 +125,7 @@ int CLIENT_STATE::check_suspend_processing() {
return SUSPEND_REASON_NO_RECENT_INPUT;
}
}
if (active_tasks.exclusive_app_running) {
if (exclusive_app_running) {
return SUSPEND_REASON_EXCLUSIVE_APP_RUNNING;
}
}
......@@ -227,7 +227,7 @@ int CLIENT_STATE::check_suspend_network() {
if (global_prefs.net_times.suspended()) {
return SUSPEND_REASON_TIME_OF_DAY;
}
if (active_tasks.exclusive_app_running) {
if (exclusive_app_running) {
return SUSPEND_REASON_EXCLUSIVE_APP_RUNNING;
}
return 0;
......
......@@ -207,6 +207,7 @@ void CONFIG::clear() {
dont_check_file_sizes = false;
dont_contact_ref_site = false;
exclusive_apps.clear();
exclusive_gpu_apps.clear();
force_auth = "default";
http_1_0 = false;
ignore_cuda_dev.clear();
......@@ -281,6 +282,10 @@ int CONFIG::parse_options(XML_PARSER& xp) {
exclusive_apps.push_back(s);
continue;
}
if (xp.parse_string(tag, "exclusive_gpu_app", s)) {
exclusive_gpu_apps.push_back(s);
continue;
}
if (xp.parse_string(tag, "force_auth", force_auth)) {
downcase_string(force_auth);
continue;
......
......@@ -112,6 +112,7 @@ struct CONFIG {
bool dont_check_file_sizes;
bool dont_contact_ref_site;
std::vector<std::string> exclusive_apps;
std::vector<std::string> exclusive_gpu_apps;
std::string force_auth;
bool http_1_0;
std::vector<int> ignore_cuda_dev;
......
......@@ -53,9 +53,7 @@ Otherwise
<li>
<a href=http://support.amd.com/us/gpudownload/Pages/index.aspx>Get latest ATI driver</a>.
</ul>
<p>
You're done!
Now start up BOINC, and soon you'll be racking up big credit numbers.
<h3>4) Attach to projects with GPU applications</h3>
<p>
Projects with NVIDIA applications:
<ul>
......@@ -70,6 +68,9 @@ Projects with ATI applications:
<li> <a href=http://milkyway.cs.rpi.edu/milkyway/>Milkyway@home</a> (coming soon)
</ul>
<p>
You're done!
Soon you'll be racking up big credit numbers.
Of course, you can attach to other projects too;
BOINC will keep both your CPU and GPU busy.
";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment