- some debugging code

svn path=/trunk/boinc/; revision=14980
This commit is contained in:
David Anderson 2008-03-28 20:20:10 +00:00
parent a0759e33de
commit ca516450e4
4 changed files with 40 additions and 1 deletions

View File

@ -2790,3 +2790,10 @@ David Mar 28 2008
sched/
sched_send.C
David Mar 28 2008
- some debugging code
client/
client_state.C
lib/
coproc.C,h

View File

@ -239,6 +239,9 @@ int CLIENT_STATE::init() {
show_host_info();
coprocs.get();
#if 0
fake_cuda(coprocs);
#endif
for (i=0; i<coprocs.coprocs.size(); i++) {
COPROC& c = coprocs.coprocs[i];
msg_printf(NULL, MSG_INFO, "Coprocessor: %s (%d)", c.name, c.count);

View File

@ -90,6 +90,32 @@ void COPROC_CUDA::get(COPROCS& coprocs) {
}
}
// add a non-existent CUDA coproc (for debugging)
//
void fake_cuda(COPROCS& coprocs) {
COPROC_CUDA cc;
strcpy(cc.name, "cuda 0");
cc.count = 1;
cc.prop.totalGlobalMem = 1000;
cc.prop.sharedMemPerBlock = 100;
cc.prop.regsPerBlock = 8;
cc.prop.warpSize = 10;
cc.prop.memPitch = 10;
cc.prop.maxThreadsPerBlock = 20;
cc.prop.maxThreadsDim[0] = 2;
cc.prop.maxThreadsDim[1] = 2;
cc.prop.maxThreadsDim[2] = 2;
cc.prop.maxGridSize[0] = 10;
cc.prop.maxGridSize[1] = 10;
cc.prop.maxGridSize[2] = 10;
cc.prop.totalConstMem = 10;
cc.prop.major = 1;
cc.prop.minor = 1;
cc.prop.clockRate = 10000;
cc.prop.textureAlignment = 1000;
coprocs.coprocs.push_back(cc);
}
void COPROC_CUDA::write_xml(FILE* f) {
fprintf(f,
"<coproc_cuda>\n"
@ -107,7 +133,8 @@ void COPROC_CUDA::write_xml(FILE* f) {
" <major>%d</major>\n"
" <minor>%d</minor>\n"
" <clockRate>%d</clockRate>\n"
" <textureAlignment>%u</textureAlignment>\n",
" <textureAlignment>%u</textureAlignment>\n"
"</coproc_cuda>\n",
count,
prop.name,
(unsigned int)prop.totalGlobalMem,

View File

@ -73,4 +73,6 @@ struct COPROC_CELL_SPE : public COPROC {
virtual ~COPROC_CELL_SPE(){}
};
void fake_cuda(COPROCS&);
#endif