- 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:
David Anderson 2008-12-22 22:12:57 +00:00
parent 30e6bd3612
commit fae0903c0f
5 changed files with 23 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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 {

View File

@ -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;
}