1 |
scarabeus 09/09/30 11:32:31 |
2 |
|
3 |
Added: 6.6.40-cuda.patch |
4 |
Log: |
5 |
Apply fix for cuda compilation issues. Per bug #286779. Thx to Kacper Kowalik for the patch. |
6 |
(Portage version: 2.2_rc38/cvs/Linux i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 sci-misc/boinc/files/6.6.40-cuda.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-misc/boinc/files/6.6.40-cuda.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-misc/boinc/files/6.6.40-cuda.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: 6.6.40-cuda.patch |
15 |
=================================================================== |
16 |
--- boinc-6.6.40.orig/sched/handle_request.cpp 2009-01-14 00:06:02.000000000 +0100 |
17 |
+++ boinc-6.6.40/sched/handle_request.cpp 2009-09-30 12:22:12.230008604 +0200 |
18 |
@@ -1172,7 +1172,7 @@ |
19 |
static inline bool requesting_work() { |
20 |
if (g_request->work_req_seconds > 0) return true; |
21 |
if (g_request->cpu_req_secs > 0) return true; |
22 |
- if (coproc_cuda && coproc_cuda->req_secs) return true; |
23 |
+ if (g_request->coproc_cuda && g_request->coproc_cuda->req_secs) return true; |
24 |
return false; |
25 |
} |
26 |
|
27 |
--- boinc-6.6.40.orig/sched/sched_send.cpp 2009-01-15 21:23:20.000000000 +0100 |
28 |
+++ boinc-6.6.40/sched/sched_send.cpp 2009-09-30 12:23:19.165922065 +0200 |
29 |
@@ -1443,9 +1443,9 @@ |
30 |
g_wreq->seconds_to_fill = clamp_req_sec(g_request->work_req_seconds); |
31 |
g_wreq->cpu_req_secs = clamp_req_sec(g_request->cpu_req_secs); |
32 |
g_wreq->cpu_req_instances = g_request->cpu_req_instances; |
33 |
- if (coproc_cuda) { |
34 |
- g_wreq->cuda_req_secs = clamp_req_sec(coproc_cuda->req_secs); |
35 |
- g_wreq->cuda_req_instances = coproc_cuda->req_instances; |
36 |
+ if (g_request->coproc_cuda) { |
37 |
+ g_wreq->cuda_req_secs = clamp_req_sec(g_request->coproc_cuda->req_secs); |
38 |
+ g_wreq->cuda_req_instances = g_request->coproc_cuda->req_instances; |
39 |
} |
40 |
if (g_wreq->cpu_req_secs || g_wreq->cuda_req_secs) { |
41 |
g_wreq->rsc_spec_request = true; |
42 |
--- boinc-6.6.40.orig/sched/server_types.cpp 2009-01-13 00:05:49.000000000 +0100 |
43 |
+++ boinc-6.6.40/sched/server_types.cpp 2009-09-30 12:23:57.220083086 +0200 |
44 |
@@ -168,6 +168,7 @@ |
45 |
have_time_stats_log = false; |
46 |
client_cap_plan_class = false; |
47 |
sandbox = -1; |
48 |
+ coproc_cuda = 0; |
49 |
|
50 |
fgets(buf, sizeof(buf), fin); |
51 |
if (!match_tag(buf, "<scheduler_request>")) return "no start tag"; |
52 |
@@ -327,6 +328,7 @@ |
53 |
} |
54 |
if (match_tag(buf, "coprocs")) { |
55 |
coprocs.parse(fin); |
56 |
+ coproc_cuda = (COPROC_CUDA*)coprocs.lookup("CUDA"); |
57 |
continue; |
58 |
} |
59 |
if (parse_bool(buf, "client_cap_plan_class", client_cap_plan_class)) continue; |
60 |
--- boinc-6.6.40.orig/sched/sched_plan.h 2008-08-06 20:36:30.000000000 +0200 |
61 |
+++ boinc-6.6.40/sched/sched_plan.h 2009-09-30 12:28:05.856453380 +0200 |
62 |
@@ -18,4 +18,13 @@ |
63 |
#include "boinc_db.h" |
64 |
#include "server_types.h" |
65 |
|
66 |
-extern bool app_plan(SCHEDULER_REQUEST&, char* plan_class, HOST_USAGE&); |
67 |
+// reasons for the planning function to reject a host |
68 |
+ |
69 |
+#define PLAN_REJECT_PREFS 1 |
70 |
+#define PLAN_REJECT_NO_COPROC 2 |
71 |
+#define PLAN_REJECT_COPROC_VERSION 3 |
72 |
+#define PLAN_REJECT_COPROC_MEM 4 |
73 |
+#define PLAN_REJECT_COPROC_SPEED 5 |
74 |
+#define PLAN_REJECT_UNKNOWN 6 |
75 |
+ |
76 |
+extern int app_plan(SCHEDULER_REQUEST&, char* plan_class, HOST_USAGE&); |
77 |
--- boinc-6.6.40.orig/sched/server_types.h 2009-01-13 00:47:52.000000000 +0100 |
78 |
+++ boinc-6.6.40/sched/server_types.h 2009-09-30 12:26:01.010255672 +0200 |
79 |
@@ -103,6 +103,8 @@ |
80 |
// Note: this is zeroed out in SCHEDULER_REPLY constructor |
81 |
// |
82 |
struct WORK_REQ { |
83 |
+ bool anonymous_platform; |
84 |
+ |
85 |
// Flags used by old-style scheduling, |
86 |
// while making multiple passes through the work array |
87 |
bool infeasible_only; |
88 |
@@ -320,6 +322,7 @@ |
89 |
HOST host; // request message is parsed into here. |
90 |
// does NOT contain the full host record. |
91 |
COPROCS coprocs; |
92 |
+ COPROC_CUDA* coproc_cuda; |
93 |
std::vector<RESULT> results; |
94 |
// completed results being reported |
95 |
std::vector<MSG_FROM_HOST_DESC> msgs_from_host; |