mirror of https://github.com/BOINC/boinc.git
- scheduler: store CUDA total memory as a double,
since it can be 4GB or larger svn path=/trunk/boinc/; revision=16737
This commit is contained in:
parent
30e6bd3612
commit
fae0903c0f
|
@ -10321,9 +10321,20 @@ David 21 Dec 2008
|
|||
sched_send.cpp
|
||||
handle_request.cpp
|
||||
|
||||
David 21 Dec 2008
|
||||
David 22 Dec 2008
|
||||
- scheduler: change default CUDA RAM requirement from 256MB to 254MB;
|
||||
apparently some NVIDIA cards report 255MB
|
||||
|
||||
sched/
|
||||
sched_plan.cpp
|
||||
|
||||
David 22 Dec 2008
|
||||
- scheduler: store CUDA total memory as a double,
|
||||
since it can be 4GB or larger
|
||||
|
||||
client/
|
||||
time_stats.cpp
|
||||
lib/
|
||||
coproc.cpp,h
|
||||
sched/
|
||||
sched_plan.cpp
|
||||
|
|
|
@ -274,7 +274,7 @@ int TIME_STATS::parse(MIOFILE& in) {
|
|||
last_update = x;
|
||||
}
|
||||
continue;
|
||||
} else if (parse_double(buf, "<on_frac>", on_frac)) {
|
||||
} else if (parse_double(buf, "<on_frac>", x)) {
|
||||
if (x < 0 || x > 1) {
|
||||
msg_printf(0, MSG_INTERNAL_ERROR,
|
||||
"bad value %f of time stats on_frac; ignoring", x
|
||||
|
@ -292,7 +292,7 @@ int TIME_STATS::parse(MIOFILE& in) {
|
|||
connected_frac = x;
|
||||
}
|
||||
continue;
|
||||
} else if (parse_double(buf, "<active_frac>", active_frac)) {
|
||||
} else if (parse_double(buf, "<active_frac>", x)) {
|
||||
if (x < 0 || x > 1) {
|
||||
msg_printf(0, MSG_INTERNAL_ERROR,
|
||||
"bad value %f of time stats active_frac; ignoring", x
|
||||
|
|
|
@ -313,10 +313,12 @@ int COPROC_CUDA::parse(FILE* fin) {
|
|||
|
||||
clear();
|
||||
while (fgets(buf, sizeof(buf), fin)) {
|
||||
if (strstr(buf, "</coproc_cuda>")) return 0;
|
||||
if (strstr(buf, "</coproc_cuda>")) {
|
||||
return 0;
|
||||
}
|
||||
if (parse_int(buf, "<count>", count)) continue;
|
||||
if (parse_str(buf, "<name>", prop.name, sizeof(prop.name))) continue;
|
||||
if (parse_int(buf, "<totalGlobalMem>", (int&)prop.totalGlobalMem)) continue;
|
||||
if (parse_double(buf, "<totalGlobalMem>", prop.dtotalGlobalMem)) continue;
|
||||
if (parse_int(buf, "<sharedMemPerBlock>", (int&)prop.sharedMemPerBlock)) continue;
|
||||
if (parse_int(buf, "<regsPerBlock>", prop.regsPerBlock)) continue;
|
||||
if (parse_int(buf, "<warpSize>", prop.warpSize)) continue;
|
||||
|
|
|
@ -103,6 +103,8 @@ struct COPROCS {
|
|||
struct cudaDeviceProp {
|
||||
char name[256];
|
||||
size_t totalGlobalMem;
|
||||
// not used on the server; dtotalGlobalMem is used instead
|
||||
// (since some boards have >= 4GB)
|
||||
size_t sharedMemPerBlock;
|
||||
int regsPerBlock;
|
||||
int warpSize;
|
||||
|
@ -118,6 +120,7 @@ struct cudaDeviceProp {
|
|||
int deviceOverlap;
|
||||
int multiProcessorCount;
|
||||
int __cudaReserved[40];
|
||||
double dtotalGlobalMem;
|
||||
};
|
||||
|
||||
struct COPROC_CUDA : public COPROC {
|
||||
|
|
|
@ -85,9 +85,9 @@ bool app_plan(SCHEDULER_REQUEST& sreq, char* plan_class, HOST_USAGE& hu) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (cp2->prop.totalGlobalMem < 254*1024*1024) {
|
||||
if (cp2->prop.dtotalGlobalMem < 254*1024*1024) {
|
||||
log_messages.printf(MSG_DEBUG,
|
||||
"CUDA mem %d < 254MB\n", cp2->prop.totalGlobalMem
|
||||
"CUDA mem %d < 254MB\n", cp2->prop.dtotalGlobalMem
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue